login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176653 Triangle, read by rows, defined by T(n, m) = f(n-m)*f(n) - f(n-0)*f(0) + 1, where f(n) is 1 if n = 0 and Prime(n) otherwise. 2
1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 4, 3, 4, 1, 1, 4, 5, 5, 4, 1, 1, 10, 9, 13, 9, 10, 1, 1, 10, 17, 19, 19, 17, 10, 1, 1, 16, 21, 37, 31, 37, 21, 16, 1, 1, 16, 29, 43, 55, 55, 43, 29, 16, 1, 1, 18, 29, 57, 63, 93, 63, 57, 29, 18, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 4, 6, 13, 20, 53, 94, 181, 288, 429, ...}.
LINKS
FORMULA
T(n, m) = f(n-m)*f(n) - f(n-0)*f(0) + 1, where f(n) is 1 if n = 0 and Prime(n) otherwise.
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 2, 1;
1, 2, 2, 1;
1, 4, 3, 4, 1;
1, 4, 5, 5, 4, 1;
1, 10, 9, 13, 9, 10, 1;
1, 10, 17, 19, 19, 17, 10, 1;
1, 16, 21, 37, 31, 37, 21, 16, 1;
1, 16, 29, 43, 55, 55, 43, 29, 16, 1;
1, 18, 29, 57, 63, 93, 63, 57, 29, 18, 1;
MATHEMATICA
f[n_]:= If[n==0, 1, Prime[n]]; T[n_, m_] = f[n-m]*f[m] - f[n]*f[0] + 1; Table[T[n, m], {n, 0, 12}, {m, 0, n}]//Flatten (* modified by G. C. Greubel, May 07 2019 *)
PROG
(PARI)
{f(n) = if(n==0, 1, prime(n))};
{T(n, k) = f(n-k)*f(k) - f(k) + 1};
for(n=0, 12, for(k=0, n, print1(T(n, k), ", "))) \\ G. C. Greubel, May 07 2019
(Magma)
f:= func< n | n eq 0 select 1 else NthPrime(n) >;
[[f(n-k)*f(k) - f(n) + 1: k in [0..n]]: n in [0..12]]; // G. C. Greubel, May 07 2019
(Sage)
def f(n):
if (n==0): return 1
else: return nth_prime(n)
def T(n, k): return f(n-k)*f(k) - f(n) +1
[[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 07 2019
CROSSREFS
Sequence in context: A331447 A352460 A342767 * A174842 A156074 A051287
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Apr 22 2010
EXTENSIONS
Edited by G. C. Greubel, May 07 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 13:30 EDT 2024. Contains 372480 sequences. (Running on oeis4.)