login
First differences of A256250.
4

%I #29 Jun 24 2020 05:28:31

%S 1,4,4,12,4,12,20,28,4,12,20,28,36,44,52,60,4,12,20,28,36,44,52,60,68,

%T 76,84,92,100,108,116,124,4,12,20,28,36,44,52,60,68,76,84,92,100,108,

%U 116,124,132,140,148,156,164,172,180,188,196,204,212,220,228,236,244,252,4,12,20,28,36,44,52,60,68,76,84,92,100

%N First differences of A256250.

%C Number of cells turned ON at n-th stage in the structure of A256250.

%C Apart from the initial 1, four times A006257 (Josephus problem).

%H Danny Rorabaugh, <a href="/A256251/b256251.txt">Table of n, a(n) for n = 0..10000</a>

%H N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>

%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>

%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>

%F a(0) = 1. For n >= 1; a(n) = 4*A006257(n).

%F For n>0, a(n) = 8*(n - 2^floor(log_2(n))) + 4 (by the formula of _Gregory Pat Scandalis_ in A006257). - _Danny Rorabaugh_, Apr 20 2015

%e Written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:

%e 1;

%e 4;

%e 4,12;

%e 4,12,20,28;

%e 4,12,20,28,36,44,52,60;

%e 4,12,20,28,36,44,52,60,68,76,84,92,100,108,116,124;

%e 4,12,20,28,36,44,52,60,68,76,84,92,100,108,116,124,132,140,148,156,164,172,180,188,196,204,212,220,228,236,244,252;

%e ...

%e Row sums give A000302.

%e Right border gives A173033.

%o (Sage) [1] + [8*(n - 2^floor(log(n,base=2))) + 4 for n in range(1,77)] # _Danny Rorabaugh_, Apr 20 2015

%o (PARI) a(n) = if(n, 8*(n - 2^logint(n,2)) + 4, 1)

%Y Cf. A000302, A006257, A011782, A028399, A139251, A147582, A162793, A169708, A256239.

%K nonn,tabf

%O 0,2

%A _Omar E. Pol_, Mar 20 2015