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-4 of 4 results.

A075153 Trajectory of 318 under the Reverse and Add! operation carried out in base 4, written in base 10.

Original entry on oeis.org

318, 1071, 5040, 5985, 10710, 20400, 24225, 43350, 81600, 85425, 165750, 327360, 342705, 664950, 1309440, 1324785, 2629110, 5241600, 5303025, 10524150, 20966400, 21027825, 41973750, 83880960, 84126705, 167925750, 335523840
Offset: 0

Views

Author

Klaus Brockhaus, Sep 05 2002

Keywords

Comments

290 is conjectured (cf. A066450) to be the smallest number such that the Reverse and Add! algorithm in base 4 does not lead to a palindrome. 318 (not 255 since 255 is a base 4 palindrome) is up to now the smallest number whose base 4 trajectory provably does not contain a palindrome. A proof along the lines of Klaus Brockhaus, On the 'Reverse and Add!' algorithm in base 2, can be based on the formula given below.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 3 in {1, 2}.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 3 = 0.

Examples

			318 (decimal) = 10332 -> 10332 + 23301 = 100233 = 1071 (decimal).
		

Crossrefs

Cf. A058042 (trajectory of binary number 10110 (decimal 22)), A061561 (A058042 written in base 10), A066450 (conjectured minimal k so that the trajectory of k in base n does not lead to a palindrome).
Cf. A075253 (trajectory of 77 in base 2), A075420 (trajectory of n in base 4 (presumably) does not reach a palindrome), A075421 (trajectory of n in base 4 (presumably) does not reach a palindrome and (presumably) does not join the trajectory of any term m < n), A075299 (trajectory of 290 in base 4), A075466 (trajectory of 266718 in base 4), A075467 (trajectory of 270798 in base 4), A076247 (trajectory of 1059774 in base 4), A076248 (trajectory of 1059831 in base 4), A091675 (trajectory of n in base 4 (presumably) does not join the trajectory of any m < n).
Cf. A166912 (a(6*n)/3), A166913 (a(6*n+1)/3), A166914 (a(6*n+2)/240), A166915 (a(6*n+3)/15), A166916 (a(6*n+4)/30), A166917 (a(6*n+5)/240).

Programs

  • Magma
    trajectory:=function(init, steps, base) a:=init; S:=[a]; for n in [1..steps] do a+:=Seqint(Reverse(Intseq(a,base)),base); Append(~S, a); end for; return S; end function; trajectory(318, 26, 4);
  • Mathematica
    NestWhileList[# + IntegerReverse[#, 4] &, 318,  # !=
    IntegerReverse[#, 4] &, 1, 26] (* Robert Price, Oct 18 2019 *)
  • PARI
    {m=318; stop=29; c=0; while(c0,d=divrem(k,4); k=d[1]; rev=4*rev+d[2]); c++; m=m+rev)}
    

Formula

a(0) = 318; a(1) = 1071; for n > 1 and n = 2 (mod 6): a(n) = 5*4^(2*k+5)-5*4^(k+2) where k = (n-2)/6; n = 3 (mod 6): a(n) = 5*4^(2*k+5)+55*4^(k+2)-15 where k = (n-3)/6; n = 4 (mod 6): a(n) = 10*4^(2*k+5)+30*4^(k+2)-10 where k = (n-4)/6; n = 5 (mod 6): a(n) = 20*4^(2*k+5)-5*4^(k+2) where k = (n-5)/6; n = 0 (mod 6): a(n) = 20*4^(2*k+5)+235*4^(k+2)-15 where k = (n-6)/6; n = 1 (mod 6): a(n) = 40*4^(2*k+5)+150*4^(k+2)-10 where k = (n-7)/6.
G.f.: 3*(106 +357*x +1680*x^2 +1465*x^3 +1785*x^4 -1600*x^5 -1900*x^6 -3400*x^7 -6800*x^8 -9780*x^9 -9860*x^10 +6720*x^11 +10064*x^12 +11088*x^13) / ((1-x)*(1+x+x^2)*(1-2*x^3)*(1+2*x^3)*(1-4*x^3)).

Extensions

Two comments added, g.f. edited, MAGMA program and cross-references added by Klaus Brockhaus, Oct 26 2009

A075299 Trajectory of 290 under the Reverse and Add! operation carried out in base 4, written in base 10.

Original entry on oeis.org

290, 835, 1610, 4195, 17060, 23845, 46490, 89080, 138125, 255775, 506510, 1238395, 5127260, 8616205, 15984335, 31949470, 79793675, 315404860, 569392925, 1060061935, 2114961710, 5206421995, 20997654620, 35262166285
Offset: 0

Views

Author

Klaus Brockhaus, Sep 12 2002

Keywords

Comments

290 is conjectured (cf. A066450) to be the smallest number such that the Reverse and Add! algorithm in base 4 does not lead to a palindrome. Unlike 318 (cf. A075153) its trajectory does not exhibit any recognizable regularity, so that the method by which the base 4 trajectory of 318 as well as the base 2 trajectories of 22 (cf. A061561), 77 (cf. A075253), 442 (cf. A075268) etc. can be proved to be palindrome-free (cf. Links), is not applicable here.

Examples

			290 (decimal) = 10202 -> 10202 + 20201 = 31003 = 835 (decimal).
		

Crossrefs

Programs

  • Mathematica
    NestWhileList[# + IntegerReverse[#, 4] &, 290,  # !=
    IntegerReverse[#, 4] &, 1, 23] (* Robert Price, Oct 18 2019 *)
  • PARI
    {m=290; stop=26; c=0; while(c0,d=divrem(k,4); k=d[1]; rev=4*rev+d[2]); c++; m=m+rev)}

A077402 Reverse and Add! carried out in base 3; number of steps needed to reach a palindrome, or -1 if no palindrome is ever reached.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 2, 3, 0, 4, 1, 2, 0, 1, 2, 0, 3, 4, 0, 1, 0, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 0, 2, 3, 3, 2, 1, 1, 2, 3, 3, 2, 3, 0, 18, 1, 2, 0, 1, 2, 4, 1, 2, 2, 1, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 2, 3, 2, 4, 17, 18, 0, 1, 0, 2, 1, 1, 2, 1, 1, 3, 1, 0, 2, 1, 1, 16, 1, 1, 2, 2, 0, 2, 4, -1, 16, 3, 15, 2, 1, 1, 2, 1, 0, 3, 3, 3, 2, 1, 1, 16, 1
Offset: 0

Views

Author

Klaus Brockhaus, Nov 05 2002

Keywords

Comments

Base-3 analog of A066057 (base 2), A075685 (base 4) and A033665 (base 10). a(103) = -1 is a conjecture (cf. A066450, A077408). For values of n such that presumably a(n) = -1 see A077404.

Examples

			17 (decimal) = 122 -> 122 + 221 = 1120 -> 1120 + 211 = 2101 -> 2101 + 1012 = 10120 -> 10120 + 2101 = 12221 (palindrome) = 160 (decimal) requires 4 steps, so a(17) = 4.
		

Crossrefs

Programs

  • ARIBAS
    m := 120; stop := 1000; for n := 0 to m do v := -1; c := 0; k := n; while c < stop do d := k; rev := 0; while d > 0 do rev := 3*rev + (d mod 3); d := d div 3; end; if k = rev then v := c; c := stop; else inc(c); k := k + rev; end; end; write(v,","); end;

A077408 Trajectory of 103 under the Reverse and Add! operation carried out in base 3, written in base 10.

Original entry on oeis.org

103, 230, 436, 776, 2424, 3856, 7400, 20856, 30928, 60920, 220248, 242704, 432896, 857152, 1460408, 2754688, 5134016, 16206744, 24437488, 44623424, 138104472, 201737128, 401511824, 1438324704, 1601682040, 2820726320, 5622321088
Offset: 0

Views

Author

Klaus Brockhaus, Nov 05 2002

Keywords

Comments

103 = A077405(0) is conjectured (cf. A066450) to be the smallest number such that the Reverse and Add! algorithm in base 3 does not lead to a palindrome. Its trajectory does not exhibit any recognizable regularity, so that the method by which the base-2 trajectories of 22 (cf. A061561), 77 (cf. A075253), 442 (cf. A075268) etc. as well as the base-4 trajectories of 318 (cf. A075153), 266718 (cf. A075466), 270798 (cf. A075467) etc. can be proved to be palindrome-free (cf. Links), is not applicable here.

Examples

			103 (decimal) = 10211 -> 10211 + 11201 = 22112 = 230 (decimal).
		

Crossrefs

Programs

  • ARIBAS
    m := 103; stop := 28; c := 0; while c < stop do write(m:group(0),","); k := m; rev := 0; while k > 0 do rev := 3*rev + (k mod 3); k := k div 3; end; inc(c); m := m+rev; end;
Showing 1-4 of 4 results.