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-10 of 15 results. Next

A061561 Trajectory of 22 under the Reverse and Add! operation carried out in base 2.

Original entry on oeis.org

22, 35, 84, 105, 180, 225, 360, 405, 744, 837, 1488, 1581, 3024, 3213, 6048, 6237, 12192, 12573, 24384, 24765, 48960, 49725, 97920, 98685, 196224, 197757, 392448, 393981, 785664, 788733, 1571328, 1574397, 3144192, 3150333, 6288384, 6294525
Offset: 0

Views

Author

N. J. A. Sloane, May 18 2001

Keywords

Comments

Sequence A058042 written in base 10. 22 is the smallest number whose base 2 trajectory does not contain a palindrome.
lim_{n -> infinity} a(n)/a(n-1) = 2 for n mod 2 = 0.
lim_{n -> infinity} a(n)/a(n-1) = 1 for n mod 2 = 1. - Klaus Brockhaus, Dec 09 2009

Crossrefs

Cf. A035522 (trajectory of 1 in base 2), A058042 (trajectory of 22 in base 2, written in base 2), A075253 (trajectory of 77 in base 2), A075268 (trajectory of 442 in base 2), A077076 (trajectory of 537 in base 2), A077077 (trajectory of 775 in base 2), A066059 (trajectory of n in base 2 (presumably) does not reach a palindrome), A075252 (trajectory of n in base 2 does not reach a palindrome and (presumably) does not join the trajectory of any term m < n), A075153 (trajectory of 318 in base 4).
Cf. A171470 (a(4*n)/2), A171471 (a(4*n+1)), A171472 (a(4*n+2)/12), A171473 (a(4*n+3)/3).

Programs

  • ARIBAS
    m := 22; stop := 36; c := 0; while c < stop do write(m,","); k := bit_length(m); rev := 0; for i := 0 to k-1 do if bit_test(m,i) then rev := bit_set(rev,k-1-i); end; end; inc(c); m := m+rev; end;.
    
  • Haskell
    a061561 n = a061561_list !! n
    a061561_list = iterate a055944 22  -- Reinhard Zumkeller, Apr 21 2013
  • 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(22, 35, 2); // Klaus Brockhaus, Dec 09 2009
    
  • Mathematica
    binRA[n_] := If[Reverse[IntegerDigits[n, 2]] == IntegerDigits[n, 2], n, FromDigits[Reverse[IntegerDigits[n, 2]], 2] + n]; NestList[binRA, 22, 100] (* Adapted from Ben Branman's code for A213012, Alonso del Arte, Jun 02 2012 *)
  • PARI
    {m=22; stop=36; c=0; while(c0,d=divrem(k,2); k=d[1]; rev=2*rev+d[2]); c++; m=m+rev)}
    

Formula

a(0) = 22; a(1) = 35; for n > 1 and n = 2 (mod 4): a(n) = 6*2^(2*k)-3*2^k where k = (n+6)/4; n = 3 (mod 4): a(n) = 6*2^(2*k)+3*2^k-3 where k = (n+5)/4; n = 0 (mod 4): a(n) = 12*2^(2*k)-3*2^k where k = (n+4)/4; n = 1 (mod 4): a(n) = 12*2^(2*k)+9*2^k-3 where k = (n+3)/4. [Klaus Brockhaus, Sep 05 2002]
G.f.: (22+35*x+18*x^2-72*x^4-90*x^5-48*x^6-60*x^7+80*x^8+112*x^9) / ((1-x)*(1+x)*(1-2*x^2)*(1-2*x^4)). [Klaus Brockhaus, Sep 05 2002, edited Dec 09 2009]
a(n+1) = A055944(a(n)). - Reinhard Zumkeller, Apr 21 2013

Extensions

More terms from Klaus Brockhaus, May 27 2001

A075421 Trajectory of n under the Reverse and Add! operation carried out in base 4 (presumably) does not reach a palindrome and (presumably) does not join the trajectory of any term m < n.

Original entry on oeis.org

290, 318, 719, 795, 799, 1210, 3903, 4199, 4207, 4219, 4236, 4278, 4279, 4294, 4326, 4333, 4334, 4338, 4402, 4598, 4662, 4726, 5046, 5357, 6157, 6174, 7246, 7247, 7295, 7407, 7549, 8063, 8191, 9211, 12319, 12431, 12463, 12539, 15487, 16519, 16587
Offset: 1

Views

Author

Klaus Brockhaus, Sep 18 2002, revised Jan 28 2004

Keywords

Comments

For 318 (cf. A075153), 266718 (cf. A075466) and 270798 (cf. A075467) one can prove that the base 4 trajectory does not contain a palindrome. A proof for 290 (cf. A075299) has not been found up to now. 4398859679359 is another known candidate (obtained from a remark of David J. Seal, cf. Links) for a term whose trajectory is provably palindrome-free, but is not secured that it does not join the trajectory of some term m < n. - If the trajectory of an integer k joins the trajectory of a smaller integer which is a term of the present sequence, then this occurs after very few Reverse and Add! steps (at most 28 for k < 20000). On the other hand, the trajectories of the terms listed above do not join the trajectory of any smaller term within at least 1000 steps.
Base-4 analog of A063048 (base 10) and A075252 (base 2); subsequence of A075420.
From A.H.M. Smeets, Mar 18 2019: (Start)
David J. Seal (see LINKS) observed a cyclic pattern (length 6) in the trajectories that can be represented by an extended right regular grammar with production rules:
S -> S_a | S_b | S_c | S_d | S_e | S_f,
S_a -> 1033202000232 T_a, T_a -> 222 T_a | 2302333113230
S_b -> 2022321332331 T_b, T_b -> 111 T_b | 1223001203131
S_c -> 10002003002212 T_c, T_c -> 222 T_c | 3221333101333
S_d -> 103312202321111 T_d, T_d -> 111 T_d | 1102023122000
S_e -> 110200123122222 T_e, T_e -> 222 T_e | 2231232001301
S_f -> 213301021321111 T_f, T_f -> 111 T_f | 1113213003312
Within the first 471 terms of this sequence we observed three trajectories with a cyclic pattern (length 6) that can be represented by a context-free grammar with production rules:
S -> S_a | S_b | S_c | S_d | S_e | S_f,
S_a -> 10 T_a 00, T_a -> 3 T_a 0 | T_a0,
S_b -> 11 T_b 01, T_b -> 0 T_b 3 | T_b0,
S_c -> 22 T_c 12, T_c -> 0 T_c 3 | T_c0,
S_d -> 10 T_d 000, T_d -> 3 T_d 0 | T_d0,
S_e -> 11 T_e 301, T_e -> 0 T_e 3 | T_e0,
S_f -> 22 T_f 312, T_f -> 0 T_f 3 | T_f0.
The terminating strings in these context-free grammars are given by:
n 2 359 371
a(n) 318 266718 270798
T_a0 33230 33230000001033230 3323001033230
T_b0 03123 03123010001103123 0312302103123
T_c0 01313 01313120002201313 0131320201313
T_d0 33323 33323000001033323 3332300103323
T_e0 03222 03222301001103222 0322201113222
T_f0 02111 02111312002202111 0211112222111
From the fact that both, right regular grammars and context-free grammars occur, we wonder if other trajectories can be represented by context-sensitive grammars as well, by which other trajectories can be proven never to end up in a palindromic string? (End)

Examples

			719 is a term since the trajectory of 719 (presumably) does not lead to an integer which occurs in the trajectory of 290 or of 318.
		

Crossrefs

Programs

  • Mathematica
    limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    utraj = {};
    Select[Range[0, 17000], (x = NestWhileList[# + IntegerReverse[#, 4] &, #, # !=IntegerReverse[#, 4] & , 1, limit];
       If[Length[x] >= limit  && Intersection[x, utraj] == {},
        utraj = Union[utraj, x]; True,
    utraj = Union[utraj, x]]) &] (* Robert Price, Oct 16 2019 *)

A166912 a(n) = 20*a(n-1) - 64*a(n-2) - 225 for n > 2; a(0) = 106, a(1) = 8075, a(2) = 114235.

Original entry on oeis.org

106, 8075, 114235, 1767675, 28042235, 447713275, 7159562235, 114537594875, 1832539914235, 29320392212475, 469125289738235, 7506000693166075, 120095995320074235, 1921535862038855675, 30744573540292362235
Offset: 0

Views

Author

Klaus Brockhaus, Oct 27 2009

Keywords

Comments

Related to Reverse and Add trajectory of 318 in base 4: A075153(6*n) = 3*a(n).
lim_{n -> infinity} a(n)/a(n-1) = 16.

Crossrefs

Programs

  • Mathematica
    Join[{106},LinearRecurrence[{21,-84,64},{8075,114235,1767675},20]] (* Harvey P. Dale, Jun 07 2012 *)
  • PARI
    m=15; v=concat([106, 8075, 114235], vector(m-3)); for(n=4, m, v[n]=20*v[n-1]-64*v[n-2]-225); v

Formula

a(n) = (1280*16^n + 940*4^n - 15)/3 for n > 0.
G.f.: (106 + 5849*x - 46436*x^2 + 40256*x^3)/((1-x)*(1-4*x)*(1-16*x)).
From G. C. Greubel, May 28 2016: (Start)
a(n) = 21*a(n-1) - 84*a(n-2) + 64*a(n-3).
E.g.f.: (1/3)*(-15*exp(x) + 940*exp(4*x) + 1280*exp(16*x)) - 629. (End)

A166913 a(n) = 20*a(n-1) - 64*a(n-2) - 150 for n > 2; a(0) = 357, a(1) = 14450, a(2) = 221650.

Original entry on oeis.org

357, 14450, 221650, 3508050, 55975250, 894989650, 14317376850, 229068199250, 3665051866450, 58640672576850, 938250132084050, 15011999596762450, 240191983481869650, 3843071695444596050, 61489146966052263250
Offset: 0

Views

Author

Klaus Brockhaus, Oct 27 2009

Keywords

Comments

Related to Reverse and Add trajectory of 318 in base 4: A075153(6*n+1) = 3*a(n).
lim_{n -> infinity} a(n)/a(n-1) = 16.

Crossrefs

Programs

  • Mathematica
    Join[{357},LinearRecurrence[{21,-84,64},{14450,221650,3508050},20]] (* Harvey P. Dale, Jun 18 2014 *)
  • PARI
    m=15; v=concat([357, 14450, 221650], vector(m-3)); for(n=4, m, v[n]=20*v[n-1]-64*v[n-2]-150); v

Formula

a(n) = (2560*16^n + 600*4^n - 10)/3 for n > 0.
G.f.: (357 + 6953*x - 51812*x^2 + 44352*x^3)/((1-x)*(1-4*x)*(1-16*x)).
a(0)=357, a(1)=14450, a(2)=221650, a(3)=3508050, a(n)=21*a(n-1)- 84*a(n-2)+ 64*a(n-3). - Harvey P. Dale, Jun 18 2014
E.g.f.: (1/3)*(-10*exp(x) + 600*exp(4*x) + 2560*exp(16*x)) - 693. - G. C. Greubel, May 28 2016

A166915 a(n) = 20*a(n-1) - 64*a(n-2) - 45 for n>1; a(0) = 399, a(1) = 5695.

Original entry on oeis.org

399, 5695, 88319, 1401855, 22384639, 357974015, 5726863359, 91626930175, 1466019348479, 23456263438335, 375300030463999, 6004799749226495, 96076793034833919, 1537228676746182655, 24595658780694282239
Offset: 0

Views

Author

Klaus Brockhaus, Oct 27 2009

Keywords

Comments

Related to Reverse and Add trajectory of 318 in base 4: A075153(6*n+3) = 15*a(n).
lim_{n -> infinity} a(n)/a(n-1) = 16.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{21, -84, 64}, {399, 5695, 88319}, 50] (* G. C. Greubel, May 28 2016 *)
  • PARI
    m=15; v=concat([399, 5695], vector(m-2)); for(n=3, m, v[n]=20*v[n-1]-64*v[n-2]-45); v

Formula

a(n) = (1024*16^n + 176*4^n - 3)/3.
G.f.: (399 - 2684*x + 2240*x^2)/((1-x)*(1-4*x)*(1-16*x)).
From G. C. Greubel, May 28 2016: (Start)
a(n) = 21*a(n-1) - 84*a(n-2) + 64*a(n-3).
E.g.f.: (1/3)*(1024*exp(16*x) + 176*exp(4*x) - 3*exp(x)). (End)

A166916 a(n) = 20*a(n-1) - 64*a(n-2) - 15 for n > 1; a(0) = 357, a(1) = 5525.

Original entry on oeis.org

357, 5525, 87637, 1399125, 22373717, 357930325, 5726688597, 91626231125, 1466016552277, 23456252253525, 375299985724757, 6004799570269525, 96076792319006037, 1537228673882871125, 24595658769241036117
Offset: 0

Views

Author

Klaus Brockhaus, Oct 27 2009

Keywords

Comments

Related to Reverse and Add trajectory of 318 in base 4: A075153(6*n+4) = 30*a(n).
lim_{n -> infinity} a(n)/a(n-1) = 16.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{21,-84,64},{357,5525,87637},20] (* Harvey P. Dale, Sep 24 2012 *)
  • PARI
    m=15; v=concat([357, 5525], vector(m-2)); for(n=3, m, v[n]=20*v[n-1]-64*v[n-2]-15); v

Formula

a(n) = (1024*16^n + 48*4^n - 1)/3.
G.f.: (357 - 1972*x + 1600*x^2)/((1-x)*(1-4*x)*(1-16*x)).
a(0)=357, a(1)=5525, a(2)=87637, a(n)=21*a(n-1)-84*a(n-2)+64*a(n-3). - Harvey P. Dale, Sep 24 2012
E.g.f.: (1/3)*(1024*exp(16*x) + 48*exp(4*x) - exp(x)). - G. C. Greubel, May 28 2016

A075420 Trajectory of n under the Reverse and Add! operation carried out in base 4 (presumably) does not reach a palindrome.

Original entry on oeis.org

290, 318, 378, 381, 438, 444, 462, 498, 501, 504, 510, 545, 567, 573, 627, 633, 636, 639, 693, 696, 699, 717, 719, 732, 751, 753, 756, 759, 765, 775, 795, 799, 800, 822, 823, 828, 835, 847, 859, 882, 883, 888, 894, 895, 915, 919, 927, 948, 954, 967, 972
Offset: 1

Views

Author

Klaus Brockhaus, Sep 18 2002

Keywords

Comments

Base-4 analog of A023108 (base 10) and A066059 (base 2).

Crossrefs

Programs

  • Mathematica
    limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    Select[Range[1000],
    Length@NestWhileList[# + IntegerReverse[#, 4] &, #, # !=
    IntegerReverse[#, 4]  &, 1, limit] == limit + 1 &] (* Robert Price, Oct 16 2019 *)
  • PARI
    {stop=1000; for(n=1,980,k=n; c=0; while(c0,d=divrem(a,4); a=d[1]; rev=4*rev+d[2]); if(rev==k,c=stop+1,k=k+rev; c++)); if(c==stop,print1(n,",")))}

Extensions

Offset changed to 1 by A.H.M. Smeets, Feb 10 2019

A166914 a(n) = 20*a(n-1) - 64*a(n-2) for n > 1; a(0) = 21, a(1) = 340.

Original entry on oeis.org

21, 340, 5456, 87360, 1398016, 22369280, 357912576, 5726617600, 91625947136, 1466015416320, 23456247709696, 375299967549440, 6004799497568256, 96076792028200960, 1537228672719650816, 24595658764588154880
Offset: 0

Views

Author

Klaus Brockhaus, Oct 27 2009

Keywords

Comments

Related to Reverse and Add trajectory of 318 in base 4: A075153(6*n+2) = 240*a(n).

Crossrefs

Programs

  • Magma
    [Binomial(4^(n+3), 2)/96: n in [0..30]]; // G. C. Greubel, Oct 02 2024
    
  • Mathematica
    CoefficientList[Series[(21-80x)/((1-4x)(1-16x)),{x,0,20}],x]  (* or *) LinearRecurrence[{20,-64},{21,340},20] (* Harvey P. Dale, Feb 23 2011 & Mar 30 2012 *)
  • PARI
    {m=15; v=concat([21, 340], vector(m-2)); for(n=3, m, v[n]=20*v[n-1]-64*v[n-2]); v}
    
  • SageMath
    A166914=BinaryRecurrenceSequence(20,-64,21,340)
    [A166914(n) for n in range(31)] # G. C. Greubel, Oct 02 2024

Formula

a(n) = (64*16^n - 4^n)/3.
G.f.: (21 - 80*x)/((1-4*x)*(1-16*x)).
Limit_{n -> infinity} a(n)/a(n-1) = 16.
From G. C. Greubel, May 28 2016: (Start)
a(n) = 20*a(n-1) - 64*a(n-2).
E.g.f.: (1/3)*(-exp(4*x) + 64*exp(16*x)). (End)

A166917 a(n) = 20*a(n-1) - 64*a(n-2) for n > 1; a(0) = 85, a(1) = 1364.

Original entry on oeis.org

85, 1364, 21840, 349504, 5592320, 89478144, 1431654400, 22906486784, 366503854080, 5864061927424, 93824991887360, 1501199874392064, 24019198007050240, 384307168179912704, 6148914691147038720, 98382635059426361344, 1574122160955116748800, 25185954575299047849984
Offset: 0

Views

Author

Klaus Brockhaus, Oct 27 2009

Keywords

Comments

Related to Reverse and Add trajectory of 318 in base 4: A075153(6*n+5) = 240*a(n).

Crossrefs

Programs

  • Magma
    [Binomial(4^(n+4), 2)/384: n in [0..30]]; // G. C. Greubel, Oct 02 2024
    
  • Mathematica
    LinearRecurrence[{20,-64}, {85, 1364}, 50] (* G. C. Greubel, May 28 2016 *)
  • PARI
    {m=15; v=concat([85, 1364], vector(m-2)); for(n=3, m, v[n]=20*v[n-1]-64*v[n-2]); v}
    
  • SageMath
    A166917=BinaryRecurrenceSequence(20,-64,85,1364)
    [A166917(n) for n in range(31)] # G. C. Greubel, Oct 02 2024

Formula

a(n) = (256*16^n - 4^n)/3.
G.f.: (85 - 336*x)/((1-4*x)*(1-16*x)).
Limit_{n -> infinity} a(n)/a(n-1) = 16.
E.g.f.: (1/3)*(256*exp(16*x) - exp(4*x)). - G. C. Greubel, May 28 2016

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

Original entry on oeis.org

266718, 1017375, 2019150, 4934715, 20413980, 34239885, 64220175, 127195950, 321080475, 1286586060, 2154739965, 4288508415, 8571775230, 21401016315, 85781907180, 149736661725, 278082371775, 1369020907200, 1433193762225
Offset: 0

Views

Author

Klaus Brockhaus, Sep 18 2002

Keywords

Comments

266718 = A075421(358) is the smallest term > 318 of A075421 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. - The generating function given describes the sequence from a(26) onward; the g.f. for the complete sequence is known but more than twice as big.

Examples

			266718 (decimal) = 1001013132 -> 1001013132 + 2313101001 = 3320120133 = 1017375 (decimal).
		

Crossrefs

Programs

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

Formula

a(0), ..., a(18) as above; a(19) = 2780823717750; a(20) = 5492189757120; a(21) = 5749636151985; a(22) = 11156010444150; a(23) = 21968759028480; a(24) = 22226205423345; a(25) = 44109148986870; for n > 25 and n = 2 (mod 6): a(n) = 5*4^(2*k+14)-83865605*4^k where k = (n-2)/6; n = 3 (mod 6): a(n) = 5*4^(2*k+14)+3941683435*4^k-15 where k = (n-3)/6; n = 4 (mod 6): a(n) = 10*4^(2*k+14)+2515968150*4^k-10 where k = (n-4)/6; n = 5 (mod 6): a(n) = 20*4^(2*k+14)-335462420*4^k where k = (n-5)/6; n = 0 (mod 6): a(n) = 20*4^(2*k+14)+3690086620*4^k-15 where k = (n-6)/6; n = 1 (mod 6): a(n) = 40*4^(2*k+14)+2012774520*4^k-10 where k = (n-7)/6. G.f.: -15*(47049901525664*x^11+23708157972464*x^10+23433347158016*x^9-46912496118440*x^8-23502049861628*x^7-23433347158016*x^6-11908468626600*x^5-6137441522940*x^4-5862630708480*x^3+11771063219370*x^2+5931333412095*x+5862630708480)/((x-1)*(x^2+x+1)*(2*x^3-1)*(2*x^3+1)*(4*x^3-1))
Showing 1-10 of 15 results. Next