login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A295559 Same as A161645 except that triangles must always grow outwards. 5
0, 1, 3, 6, 6, 6, 12, 18, 12, 6, 12, 18, 18, 18, 30, 42, 24, 6, 12, 18, 18, 18, 30, 42, 30, 18, 30, 42, 42, 42, 66, 90, 48, 6, 12, 18, 18, 18, 30, 42, 30, 18, 30, 42, 42, 42, 66, 90, 54, 18, 30, 42, 42, 42, 66, 90, 66, 42, 66, 90, 90, 90, 138, 186, 96, 6, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Note that Reed's version has errors (see A295558).

REFERENCES

R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6. [Describes the dual structure where new triangles are joined at vertices rather than edges.]

LINKS

Lars Blomberg, Table of n, a(n) for n = 0..10000

R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6. [Scanned photocopy of pages 5, 6 only, with annotations by R. K. Guy and N. J. A. Sloane]

N. J. A. Sloane, Illustration of first 7 generations of A161644 and A295560 (edge-to-edge version)

N. J. A. Sloane, Illustration of first 11 generations of A161644 and A295560 (vertex-to-vertex version) [Include the 6 cells marked x to get A161644(11), exclude them to get A295560(11).]

N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS

FORMULA

From Lars Blomberg, Dec 20 2017: (Start)

Empirically (correct to 3*10^6 terms):

Convert n+1 to binary and view it as 1a1b or 1a1b1,

where a is zero or more digits, let "ones" be the number of 1's in a,

and b is zero or more 0's, let "zeros" be the number of 0's.

Let "len" be the total number of binary digits.

Then r=A295559(n) is determined by ones, zeros, len, and the parity of n+1, as follows:

if (n==0,1,2) r=0,1,3

else if (n+1 is odd)

    if (len==zeros+2) r=BVal(1, zeros-1) else if (zeros==0) r=BVal(ones+1, ones+1) else r=BVal(ones+2, ones+zeros)

else

    if (len==zeros+1) r=AVal(zeros-2) else r=AVal(ones+zeros-1)

and

AVal(k)=6*(2^(k+1)-1)

BVal(k, kk)=3*2^k + sum(j=0,kk-1, 6 * 2^j) (End)

PROG

(PARI) \\ Empirically discovered algorithm.

AVal(k)=6*(2^(k+1)-1)

BVal(k, kk)={ local v; v = 3 * 2^k; for (j=0, kk-1, v += 6 * 2^j); v}

A295559(n)={ local (len, zeros, ones, r);

if(n==0, return(0));

if(n==1, return(1));

if(n==2, return(3));

n++; len=length(binary(n));

zeros=ones=0; i=bittest(n, 0);  \\ Skip trailing 1

while(bittest(n, i)==0, zeros++; i++);

for(j=i+1, len-2, ones+=bittest(n, j));

if (bittest(n, 0)==1,

if (len==zeros+2, r=BVal(1, zeros-1), if (zeros==0, r=BVal(ones+1, ones+1), r=BVal(ones+2, ones+zeros))),

if (len==zeros+1, r=AVal(zeros-2), r=AVal(ones+zeros-1)));

r; }

vector(200, i, A295559(i-1))

\\ Lars Blomberg, Dec 20 2017

CROSSREFS

Cf. A161644, A161645, A295560.

Sequence in context: A155067 A094011 A295558 * A161645 A081289 A160504

Adjacent sequences:  A295556 A295557 A295558 * A295560 A295561 A295562

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Nov 27 2017

EXTENSIONS

Terms a(18) and beyond from Lars Blomberg, Dec 20 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 2 08:47 EDT 2021. Contains 346422 sequences. (Running on oeis4.)