The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A254967 Triangle of iterated absolute differences of lucky numbers read by antidiagonals upwards. 6

%I #13 Sep 23 2021 00:32:45

%S 1,2,3,2,4,7,0,2,2,9,0,0,2,4,13,0,0,0,2,2,15,2,2,2,2,4,6,21,2,0,2,0,2,

%T 2,4,25,2,0,0,2,2,0,2,6,31,0,2,2,2,0,2,2,4,2,33,0,0,2,0,2,2,0,2,2,4,

%U 37,0,0,0,2,2,0,2,2,0,2,6,43,2,2,2,2,0,2

%N Triangle of iterated absolute differences of lucky numbers read by antidiagonals upwards.

%C This sequence is related to the lucky numbers (cf. A000959) in the same way as A036262 is related to the prime numbers;

%C T(n,0) = A054978(n);

%C T(2*n,n) = A254969(n);

%C T(n,n-1) = A031883(n), n > 0;

%C T(n,n) = A000959(n+1);

%C for n > 0: T(n,k) = abs(T(n,k+1) - T(n-1,k), k = 0 .. n-1.

%H Reinhard Zumkeller, <a href="/A254967/b254967.txt">Rows n = 0..125 of triangle, flattened</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LuckyNumber.html">Lucky number.</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Lucky_number">Lucky number</a>

%e . 0: 1

%e . 1: 2 3

%e . 2: 2 4 7

%e . 3: 0 2 2 9

%e . 4: 0 0 2 4 13

%e . 5: 0 0 0 2 2 15

%e . 6: 2 2 2 2 4 6 21

%e . 7: 2 0 2 0 2 2 4 25

%e . 8: 2 0 0 2 2 0 2 6 31

%e . 9: 0 2 2 2 0 2 2 4 2 33

%e . 10: 0 0 2 0 2 2 0 2 2 4 37

%e . 11: 0 0 0 2 2 0 2 2 0 2 6 43

%e . 12: 2 2 2 2 0 2 2 0 2 2 0 6 49

%e . 13: 0 2 0 2 0 0 2 0 0 2 4 4 2 51 .

%t nmax = 13; (* max index for triangle rows *)

%t imax = 25; (* max index for initial lucky array L *)

%t L = Table[2i + 1, {i, 0, imax}];

%t For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]];

%t T[n_, n_] := If[n+1 <= Length[L], L[[n+1]], Print["imax should be increased"]; 0];

%t T[n_, k_] := T[n, k] = Abs[T[n, k+1] - T[n-1, k]];

%t Table[T[n, k], {n, 0, nmax}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Sep 22 2021 *)

%o (Haskell)

%o a254967 n k = a254967_tabl !! n !! k

%o a254967_row n = a254967_tabl !! n

%o a254967_tabl = diags [] $

%o iterate (\lds -> map abs $ zipWith (-) (tail lds) lds) a000959_list

%o where diags uss (vs:vss) = (map head wss) : diags (map tail wss) vss

%o where wss = vs : uss

%Y Cf. A054978 (left edge), A254969 (central terms), A000959 (right edge), A031883, A036262.

%K nonn,tabl

%O 0,2

%A _Reinhard Zumkeller_, Feb 11 2015

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 16 05:56 EDT 2024. Contains 372549 sequences. (Running on oeis4.)