cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A117943 a(1) = 0, a(2) = 1; a(3n) = a(n); if every third term (a(3), a(6), a(9), ...) is deleted, this gives back the original sequence.

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Eric Angelini, May 03 2006

Keywords

Comments

A self-generating sequence.
A super-fractal? Might also be called a lizard sequence (une suite du lézard) because it grows back from its tail.
Terms were computed by Gilles Sadowski.
First differences of Rauzy's sequence A071996. - Benoit Cloitre, Mar 10 2007
This is the characteristic sequence of A178931. Instead of "a(1)=0, a(2)=1", one could also say "Lexicographically earliest nontrivial sequence such that...". Starting with "a(1)=1, a(2)=2" would yield the m=3 analog of (the m=10 variant) A126616. See A255824-A255829 for the m=4,...,m=9 variants. - M. F. Hasler, Mar 07 2015

References

  • J.-P. Delahaye, La suite du lézard et autres inventions, Pour la Science, No. 353, 2007.

Crossrefs

Programs

  • PARI
    a(n)=while(n>5,if(n%3,n-=n\3,n\=3));n==2 \\ M. F. Hasler, Mar 07 2015

Formula

a(1)=0, a(1)=1; and for n>2, a(n)=a(n/3) if Mod(n,3)=0, a(n)=a(n-floor(n/3)) if Mod(n,3)>0. - John W. Layman, Feb 14 2007

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 14 2007
Definition simplified by M. F. Hasler, Mar 07 2015

A126616 a(n) = n for n < 10, a(10*n) = a(n), and if the terms a(10), a(20), a(30), ... are deleted, one gets back the original sequence.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 4, 2, 1, 3, 4, 2, 1, 3, 4, 2, 5, 1, 3, 4, 2, 5, 1, 3, 4, 2, 6, 5, 1, 3, 4, 2, 6, 5, 1, 3, 7, 4, 2, 6, 5, 1, 3, 7, 4, 2, 8, 6, 5, 1, 3, 7, 4, 2, 8, 6, 9, 5, 1, 3, 7, 4, 2, 8, 6, 9, 1, 5, 1, 3, 7, 4
Offset: 1

Views

Author

N. J. A. Sloane, Feb 09 2007

Keywords

Comments

A self-generating sequence.
Invented by Eric Angelini. Might also be called a lizard sequence (une suite du lézard) because it grows back from its tail.

References

  • J.-P. Delahaye, La suite du lézard et autres inventions, Pour la Science, No. 353, 2007.

Crossrefs

Programs

  • Maple
    A126616 := proc(n) option remember ; if n < 10 then n ; elif n mod 10 = 0 then A126616(n/10) ; else A126616( n-floor(n/10) ) ; fi ; end: seq(A126616(n),n=1..120) ; # R. J. Mathar, Oct 02 2007
  • Mathematica
    a[n_] := Module[{m = 10, k = n, q}, While[k >= m, q = Quotient[k, m]; If[Mod[k, m] != 0, k -= q, k = q]]; k];
    Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Aug 02 2022, after M. F. Hasler *)
  • PARI
    a(n,m=10)=while(n>=m,if(n%m,n-=n\m,n\=m));n \\ M. F. Hasler, Mar 07 2015

Extensions

More terms from R. J. Mathar, Oct 02 2007
Definition rephrased by M. F. Hasler, Mar 09 2015

A183213 Ordering of the numbers in the set S generated by these rules: 1 is in S, and if n is in S, then floor[(3n-1)/2] and 3n are in S.

Original entry on oeis.org

1, 3, 4, 5, 7, 9, 10, 12, 13, 14, 15, 17, 19, 20, 21, 22, 25, 27, 28, 29, 30, 31, 32, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 51, 53, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 75, 76, 79, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101, 104, 108, 111, 112, 113, 117, 118, 120, 121, 122, 123, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135
Offset: 1

Views

Author

Clark Kimberling, Dec 30 2010

Keywords

Comments

This sequence results from flattening and sorting the tree at A183211. Complement of A178931, obtained from the tree at A183212.

Crossrefs

Programs

  • Mathematica
    nn=200; t={1}; t0=t; While[t=Select[Union[t,Floor[(3*t-1)/2],3*t], #<=nn &]; t0 != t, t0=t]; t
    f[s_List] := Select[ Union@ Join[s, Floor[(3 s - 1)/2], 3 s], # < 201 &]; NestWhile[f, {1}, UnsameQ, All]

Formula

(See the Mathematica code.)

A183208 Iterates of f(x)=floor((3x-1)/2) from x=6.

Original entry on oeis.org

6, 8, 11, 16, 23, 34, 50, 74, 110, 164, 245, 367, 550, 824, 1235, 1852, 2777, 4165, 6247, 9370, 14054, 21080, 31619, 47428, 71141, 106711, 160066, 240098, 360146, 540218, 810326, 1215488, 1823231, 2734846, 4102268, 6153401, 9230101, 13845151
Offset: 1

Views

Author

Clark Kimberling, Dec 30 2010

Keywords

Examples

			a(1)=6; a(2)=f(a(1))=8; a(3)=f(a(2))=11.
		

Crossrefs

Programs

  • Mathematica
    x=6; Join[{x}, Table[x=Floor[(3*x-1)/2], {n,0,36}]]
    f[x_]:=Floor[(3x-1)/2]; NestList[f,6,37]
  • PARI
    v=vector(100); v[1]=6; for(n=2,#v,v[n]=floor((3*v[n-1]-1)/2)); v

Formula

Iterates of f(x)=floor((3x-1)/2) from x=6.

A255822 Number of nonzero terms in A117943 up to index 2^n: a(n) = Sum_{k=1..2^n} A117943(k).

Original entry on oeis.org

0, 1, 1, 3, 5, 9, 19, 41, 84, 163, 311, 615, 1268, 2612, 5228, 10244, 20172, 40496, 82066, 165284, 329388, 654207, 1305709, 2620890, 5262399, 10524162, 20983533, 41878200, 83848212, 168188942, 337036806, 673896773, 1345770393, 2688442850, 5375471835
Offset: 0

Views

Author

M. F. Hasler, Mar 09 2015

Keywords

Comments

The sequence seems to grow roughly as a(n) ~ c*2^n with c = 0.313...

Crossrefs

Programs

  • PARI
    N=1;s=0;for(n=1,9e9,s+=A117943(n);n
    				

Extensions

a(25)-a(34) from Hiroaki Yamanouchi, Mar 10 2015
Showing 1-5 of 5 results.