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

%I #11 Sep 08 2022 08:45:53

%S 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,

%T 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,

%U 18,29,57,63,93,63,57,29,18,1

%N 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.

%C Row sums are: {1, 2, 4, 6, 13, 20, 53, 94, 181, 288, 429, ...}.

%H G. C. Greubel, <a href="/A176653/b176653.txt">Rows n = 0..100 of triangle, flattened</a>

%F 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.

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 2, 1;

%e 1, 2, 2, 1;

%e 1, 4, 3, 4, 1;

%e 1, 4, 5, 5, 4, 1;

%e 1, 10, 9, 13, 9, 10, 1;

%e 1, 10, 17, 19, 19, 17, 10, 1;

%e 1, 16, 21, 37, 31, 37, 21, 16, 1;

%e 1, 16, 29, 43, 55, 55, 43, 29, 16, 1;

%e 1, 18, 29, 57, 63, 93, 63, 57, 29, 18, 1;

%t 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 *)

%o (PARI)

%o {f(n) = if(n==0, 1, prime(n))};

%o {T(n,k) = f(n-k)*f(k) - f(k) + 1};

%o for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ _G. C. Greubel_, May 07 2019

%o (Magma)

%o f:= func< n | n eq 0 select 1 else NthPrime(n) >;

%o [[f(n-k)*f(k) - f(n) + 1: k in [0..n]]: n in [0..12]]; // _G. C. Greubel_, May 07 2019

%o (Sage)

%o def f(n):

%o if (n==0): return 1

%o else: return nth_prime(n)

%o def T(n, k): return f(n-k)*f(k) - f(n) +1

%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, May 07 2019

%Y Cf. A146985

%K nonn,tabl

%O 0,5

%A _Roger L. Bagula_, Apr 22 2010

%E Edited by _G. C. Greubel_, May 07 2019

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 April 19 02:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)