Find the k-th entry of the n-th row of a α-number triangle











up vote
-2
down vote

favorite












This question basically asks you to pull elements from Pascal's triangle however also applying to triangles with different values of α, meaning the first and last number of every row can be any number. the values are created by adding the numbers above it to the left and right.



This what I have so far:



f_nt <- function(n, k, alpha) {
if (k<0|k>n) {
return(0)
}
if (k==0 | k==n) {
return(alpha)
}
else {
return(alpha*(n-1))
}
}


I know the second part is incorrect however I am having trouble figuring out what the equation should be. Can anyone help?










share|improve this question









New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Not exactly sure what you mean when the first and last number can be any number. Do these all have the value alpha? If you want the coefficient in Pascal's triangle, is choose(n,k) not what you're looking for?
    – mickey
    2 days ago










  • basically the first and last number of every row are a set number, alpha. Now that I am thinking about it more I think this problem revolves more around creating a list with sublists. the larger list being the triangle and each sublist being each row of the triangle. and basically each element in the row, beside the first and last element, is the sum of the elements above it in the previous row.
    – er427lts
    yesterday










  • I still don't follow. Are you trying to get k-th entry from the polynomial (alpha*x + alpha*y)^n? Are you trying to create an R object that has all of these coefficients?
    – mickey
    yesterday















up vote
-2
down vote

favorite












This question basically asks you to pull elements from Pascal's triangle however also applying to triangles with different values of α, meaning the first and last number of every row can be any number. the values are created by adding the numbers above it to the left and right.



This what I have so far:



f_nt <- function(n, k, alpha) {
if (k<0|k>n) {
return(0)
}
if (k==0 | k==n) {
return(alpha)
}
else {
return(alpha*(n-1))
}
}


I know the second part is incorrect however I am having trouble figuring out what the equation should be. Can anyone help?










share|improve this question









New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Not exactly sure what you mean when the first and last number can be any number. Do these all have the value alpha? If you want the coefficient in Pascal's triangle, is choose(n,k) not what you're looking for?
    – mickey
    2 days ago










  • basically the first and last number of every row are a set number, alpha. Now that I am thinking about it more I think this problem revolves more around creating a list with sublists. the larger list being the triangle and each sublist being each row of the triangle. and basically each element in the row, beside the first and last element, is the sum of the elements above it in the previous row.
    – er427lts
    yesterday










  • I still don't follow. Are you trying to get k-th entry from the polynomial (alpha*x + alpha*y)^n? Are you trying to create an R object that has all of these coefficients?
    – mickey
    yesterday













up vote
-2
down vote

favorite









up vote
-2
down vote

favorite











This question basically asks you to pull elements from Pascal's triangle however also applying to triangles with different values of α, meaning the first and last number of every row can be any number. the values are created by adding the numbers above it to the left and right.



This what I have so far:



f_nt <- function(n, k, alpha) {
if (k<0|k>n) {
return(0)
}
if (k==0 | k==n) {
return(alpha)
}
else {
return(alpha*(n-1))
}
}


I know the second part is incorrect however I am having trouble figuring out what the equation should be. Can anyone help?










share|improve this question









New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











This question basically asks you to pull elements from Pascal's triangle however also applying to triangles with different values of α, meaning the first and last number of every row can be any number. the values are created by adding the numbers above it to the left and right.



This what I have so far:



f_nt <- function(n, k, alpha) {
if (k<0|k>n) {
return(0)
}
if (k==0 | k==n) {
return(alpha)
}
else {
return(alpha*(n-1))
}
}


I know the second part is incorrect however I am having trouble figuring out what the equation should be. Can anyone help?







r






share|improve this question









New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago









m0nhawk

14.9k83160




14.9k83160






New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









er427lts

1




1




New contributor




er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






er427lts is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Not exactly sure what you mean when the first and last number can be any number. Do these all have the value alpha? If you want the coefficient in Pascal's triangle, is choose(n,k) not what you're looking for?
    – mickey
    2 days ago










  • basically the first and last number of every row are a set number, alpha. Now that I am thinking about it more I think this problem revolves more around creating a list with sublists. the larger list being the triangle and each sublist being each row of the triangle. and basically each element in the row, beside the first and last element, is the sum of the elements above it in the previous row.
    – er427lts
    yesterday










  • I still don't follow. Are you trying to get k-th entry from the polynomial (alpha*x + alpha*y)^n? Are you trying to create an R object that has all of these coefficients?
    – mickey
    yesterday


















  • Not exactly sure what you mean when the first and last number can be any number. Do these all have the value alpha? If you want the coefficient in Pascal's triangle, is choose(n,k) not what you're looking for?
    – mickey
    2 days ago










  • basically the first and last number of every row are a set number, alpha. Now that I am thinking about it more I think this problem revolves more around creating a list with sublists. the larger list being the triangle and each sublist being each row of the triangle. and basically each element in the row, beside the first and last element, is the sum of the elements above it in the previous row.
    – er427lts
    yesterday










  • I still don't follow. Are you trying to get k-th entry from the polynomial (alpha*x + alpha*y)^n? Are you trying to create an R object that has all of these coefficients?
    – mickey
    yesterday
















Not exactly sure what you mean when the first and last number can be any number. Do these all have the value alpha? If you want the coefficient in Pascal's triangle, is choose(n,k) not what you're looking for?
– mickey
2 days ago




Not exactly sure what you mean when the first and last number can be any number. Do these all have the value alpha? If you want the coefficient in Pascal's triangle, is choose(n,k) not what you're looking for?
– mickey
2 days ago












basically the first and last number of every row are a set number, alpha. Now that I am thinking about it more I think this problem revolves more around creating a list with sublists. the larger list being the triangle and each sublist being each row of the triangle. and basically each element in the row, beside the first and last element, is the sum of the elements above it in the previous row.
– er427lts
yesterday




basically the first and last number of every row are a set number, alpha. Now that I am thinking about it more I think this problem revolves more around creating a list with sublists. the larger list being the triangle and each sublist being each row of the triangle. and basically each element in the row, beside the first and last element, is the sum of the elements above it in the previous row.
– er427lts
yesterday












I still don't follow. Are you trying to get k-th entry from the polynomial (alpha*x + alpha*y)^n? Are you trying to create an R object that has all of these coefficients?
– mickey
yesterday




I still don't follow. Are you trying to get k-th entry from the polynomial (alpha*x + alpha*y)^n? Are you trying to create an R object that has all of these coefficients?
– mickey
yesterday

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






er427lts is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53402770%2ffind-the-k-th-entry-of-the-n-th-row-of-a-%25ce%25b1-number-triangle%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








er427lts is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















er427lts is a new contributor. Be nice, and check out our Code of Conduct.













er427lts is a new contributor. Be nice, and check out our Code of Conduct.












er427lts is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53402770%2ffind-the-k-th-entry-of-the-n-th-row-of-a-%25ce%25b1-number-triangle%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Berounka

Different font size/position of beamer's navigation symbols template's content depending on regular/plain...

Sphinx de Gizeh