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.

Previous Showing 11-20 of 23 results. Next

A160390 Decimal expansion of sqrt(3) - 1.

Original entry on oeis.org

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

Views

Author

Harry J. Smith, May 31 2009

Keywords

Comments

Continued fraction expansion leads to the ternary digital root of n.

Examples

			0.732050807568877293527446341505872366942805253810380628055806979451933...
		

Crossrefs

Cf. A002194, A134451 (continued fraction).

Programs

  • Magma
    SetDefaultRealField(RealField(100)); Sqrt(3) -1; // G. C. Greubel, Nov 20 2018
    
  • Mathematica
    RealDigits[Sqrt[3]-1,10,120][[1]] (* Harvey P. Dale, Dec 16 2016 *)
  • PARI
    default(realprecision, 20080); x=10*(sqrt(3)-1); for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b160390.txt", n, " ", d));
    
  • Sage
    numerical_approx(sqrt(3) -1, digits=100) # G. C. Greubel, Nov 20 2018

A230639 Let M(1)=0 and for n>1, B(n)=(M(ceiling(n/2))+M(floor(n/2))+2)/2, M(n)=3^B(n)+M(floor(n/2))+1. This sequence gives B(n).

Original entry on oeis.org

1, 3, 5, 17, 29, 139, 249, 64570209, 129140169, 34315253252541, 68630377364913, 1044297913696328396542704032390321722034449074468444246791788357605, 2088595827392656793085408064780643444068898148936888424953199350297
Offset: 2

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Comments

The largest power of 3 in M(n) = A230640(n).

Crossrefs

Cf. A230093, A230640 (for M(n)).
Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

Programs

  • Maple
    f:=proc(n) option remember; local B, M;
    if n<=1 then RETURN([0, 0]);
    else
    B:=(f(ceil(n/2))[2] + f(floor(n/2))[2] + 2)/2;
    M:=3^B+f(floor(n/2))[2]+1; RETURN([B, M]); fi;
    end proc;
    [seq(f(n)[1], n=1..9)];

Extensions

Terms a(10) onward from Max Alekseyev, Nov 02 2013

A230642 Number of integers m such that m + (sum of digits in base-3 representation of m) = n.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 3, 0, 2, 0, 3, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 3, 0, 2, 0, 3, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 3, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2
Offset: 0

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Comments

The usual convention in the OEIS is to omit the zero terms when every second term is zero. An exception was made in this case in order to preserve the parallels with A228085 and A230632. See also A230663.
a(n) is the number of times n occurs in A230641.

Crossrefs

Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

A230853 Numbers n such that m + (sum of digits in base-3 representation of m) = n has exactly one solution.

Original entry on oeis.org

0, 2, 6, 16, 26, 34, 44, 54, 62, 72, 98, 108, 116, 126, 136, 144, 154, 180, 190, 198, 208, 218, 226, 236, 260, 270, 278, 288, 298, 306, 316, 342, 352, 360, 370, 380, 388, 398, 424, 434, 442, 452, 462, 470, 480, 504, 514, 522, 532, 542, 550, 560, 586, 596, 604, 614, 624, 632, 642, 668, 678, 686
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Crossrefs

Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

Programs

  • Mathematica
    Select[Tally[Table[m+Total[IntegerDigits[m,3]],{m,0,700}]],#[[2]]==1&][[;;,1]] (* Harvey P. Dale, Feb 13 2023 *)

A230854 Numbers n such that m + (sum of digits in base-3 representation of m) = n has exactly two solutions.

Original entry on oeis.org

4, 8, 10, 12, 14, 18, 20, 22, 24, 30, 36, 38, 40, 42, 46, 48, 50, 52, 58, 64, 66, 68, 70, 74, 76, 78, 80, 82, 88, 90, 92, 94, 96, 100, 102, 104, 106, 112, 118, 120, 122, 124, 128, 130, 132, 134, 140, 146, 148, 150, 152, 156, 158, 160, 162, 164, 170, 172, 174, 176, 178, 182, 184, 186, 188
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Crossrefs

Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

Programs

  • Mathematica
    Select[Tally[Table[m+Total[IntegerDigits[m,3]],{m,200}]],#[[2]]==2&][[All,1]] (* Harvey P. Dale, Aug 17 2019 *)

A230855 Numbers n such that m + (sum of digits in base-3 representation of m) = n has exactly three solutions.

Original entry on oeis.org

28, 32, 56, 60, 84, 86, 110, 114, 138, 142, 166, 168, 192, 196, 220, 224, 244, 252, 272, 276, 300, 304, 328, 330, 354, 358, 382, 386, 410, 412, 436, 440, 464, 468, 488, 496, 516, 520, 544, 548, 572, 574, 598, 602, 626, 630, 654, 656, 680, 684, 708, 712, 730, 732, 734, 736, 738, 740, 758, 762
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Crossrefs

Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

A230856 Numbers n such that m + (sum of digits in base-3 representation of m) = n has exactly four solutions.

Original entry on oeis.org

248, 492, 978, 1222, 1708, 1952, 2192, 2196, 2436, 2680, 3166, 3410, 3896, 4140, 4380, 4384, 4624, 4868, 5354, 5598, 6084, 6328, 6566, 6572, 6810, 7054, 7540, 7784, 8270, 8514, 8754, 8758, 8998, 9242, 9728, 9972, 10458, 10702, 10942, 10946, 11186, 11430, 11916, 12160, 12646, 12890, 13128
Offset: 1

Views

Author

N. J. A. Sloane, Oct 31 2013

Keywords

Crossrefs

Related base-3 sequences: A053735, A134451, A230641, A230642, A230643, A230853, A230854, A230855, A230856, A230639, A230640, A010063 (trajectory of 1)

A134452 Balanced ternary digital root of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 27 2007

Keywords

Comments

a(A005843(n))=0; a(A134453(n))=-1; a(A134454(n))=1; abs(a(A005408(n)))=1;
abs(a(n)) = A000035(n).

Examples

			42 == '+---0' --> +1-1-2-1+0=-2 == '-+' --> -1+1=0;
43 == '+---+' --> +1-1-2-1+1=-1;
		

References

  • D. E. Knuth, The Art of Computer Programming, Addison-Wesley, Reading, MA, Vol 2, pp 173-175.

Crossrefs

Formula

a(n) = f(n) where f(n) = if n<-1 then f(-A065363(-n)) else (if n>1 then f(A065363(n)) else n).

A382488 The number of unitary 3-smooth divisors of n.

Original entry on oeis.org

1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2025

Keywords

Comments

Period 6: repeat [1, 2, 2, 2, 1, 4].
Decimal expansion of 407380/333333.
Continued fraction expansion of 10/(6 + sqrt(66)) (with offset 0).

Crossrefs

The number of unitary prime(k)-smooth divisors of n: A134451 (k = 1), this sequence (k = 2), A382489 (k = 3).

Programs

  • Mathematica
    Table[{1, 2, 2, 2, 1, 4}, {12}] // Flatten
  • PARI
    a(n) = [1, 2, 2, 2, 1, 4][(n-1) % 6 + 1];

Formula

Multiplicative with a(p^e) = 2 if p <= 3, and 1 otherwise.
a(n) = A034444(A065331(n)).
a(n) = A034444(n) if and only if n is 3-smooth (A003586).
a(n) = A072078(n) if and only if n is squarefree (A005117).
a(n) = abs(A181982(n+9)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2.
G.f.: -(4*x^6 + x^5 + 2*x^4 + 2*x^3 +2*x^2 + x)/(x^6 - 1).
Dirichlet g.f.: (1 + 1/2^s) * (1 + 1/3^s) * zeta(s).

A288699 Decimal representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 494", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

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

Views

Author

Robert Price, Jun 13 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 494; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 10], {i, 1, stages - 1}]
Previous Showing 11-20 of 23 results. Next