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

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 *)

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

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

Original entry on oeis.org

103, 127, 167, 176, 180, 183, 185, 191, 197, 200, 206, 207, 209, 215, 221, 230, 239, 291, 309, 318, 340, 358, 369, 376, 387, 394, 396, 413, 418, 431, 436, 449, 454, 467, 472, 582, 600, 618, 636, 655, 660, 673, 678, 691, 696, 709, 714, 746, 776, 803, 805
Offset: 1

Views

Author

Klaus Brockhaus, Nov 05 2002

Keywords

Comments

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

Crossrefs

Programs

  • ARIBAS
    m := 900; stop := 1000; for n := 0 to m do c := 0; k := n; b := 1; while b do d := k; rev := 0; while d > 0 do rev := 3*rev + (d mod 3); d := d div 3; end; if k = rev or c = stop then b := 0; else k := k + rev; end; inc(c); end; if c > stop then write(n,","); end; end;
  • Mathematica
    limit = 10^3; (* Assumes that there is no palindrome if none is found before "limit" iterations *)
    Select[Range[805],
     Length@NestWhileList[# + IntegerReverse[#, 3] &, #, # !=
    IntegerReverse[#, 3]  &, 1, limit] == limit + 1 &] (* Robert Price, Oct 19 2019 *)

Extensions

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

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

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Sep 24 2002

Keywords

Comments

Base-4 analog of A033665 (base 10) and A066057 (base 2). For values of n such that presumably a(n) = -1 see A075420.

Examples

			26 (decimal) = 122 -> 122 + 221 = 1003 -> 1003 + 3001 = 10010 -> 10010 + 01001 = 11011 (palindrome) = 325 (decimal) requires 3 steps, so a(26) = 3.
		

Crossrefs

Programs

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

A075686 In base 4, n sets a new record for the number of Reverse and Add! steps needed to reach a palindrome starting with n.

Original entry on oeis.org

0, 4, 7, 26, 28, 127, 199, 296, 511, 3119, 16861, 18164, 19453, 20468, 270824
Offset: 0

Views

Author

Klaus Brockhaus, Sep 24 2002

Keywords

Comments

RECORDS transform of A075685. - Base-4 analog of A065198 (base 10) and A066144 (base 2). Integers like 290, for which a palindrome is (presumably) never reached (cf. A075420), are of course disregarded. A075687 gives the corresponding records.

Examples

			Starting with 26, 3 Reverse and Add! steps are needed to reach a palindrome; starting with n < 26, less (at most 2) steps are needed.
		

Crossrefs

A348570 Positive integers which apparently never result in a palindrome under repeated applications of the function f(x) = x + (x with digits in Zeckendorf representation reversed). Zeckendorf representation analog of Lychrel numbers.

Original entry on oeis.org

59, 61, 69, 75, 77, 100, 105, 113, 115, 122, 128, 130, 131, 135, 136, 140, 142, 143, 148, 151, 153, 160, 162, 163, 166, 172, 177, 180, 183, 188, 191, 192, 196, 198, 200, 209, 210, 212, 215, 222, 223, 229, 230, 231, 237, 240, 249, 250, 257, 258, 263, 264, 266
Offset: 1

Views

Author

A.H.M. Smeets, Oct 23 2021

Keywords

Comments

Zeckendorf representation version of A023108 (base 10).
For the Zeckendorf representation of numbers see A014417.
For palindromic numbers in Zeckendorf representation see A094202.
The "Reverse and Add!" operation (A349239) applied in Zeckendorf representation seems to behave similarly to the "Reverse and Add!" operation applied in any fixed-base representation. The first 53 terms are however obtained after performing 10^4 "Reverse and Add!" steps (see Python program).
For records and record-setting values in the number of "Reverse and Add!" steps see A348572 and A348571 respectively.
Do any of these numbers have a trajectory in which the Lychrel property can be proved (like 22 in base 2 as in A061561)?
Iteration steps are given by n := n+A349238(n), or n := A349239(n).
Closure of reverse operation is given by: Let Z be the regular expression for numbers in Zeckendorf representation, Z = 0|(100*)*10*, and L(Z) its corresponding regular language. Then for s in L(Z), the reversal of s is in L(0*)L(Z).
Let h be the homomorphism from Zeckendorf representation to a conventional radix representation, then addition in Zeckendorf representation, +_Z, is given by z1 +_Z z2 = h^(-1)(h(z1) + h(z2)). A direct method for addition in Zeckendorf representation is given by Ahlbach et al.

Crossrefs

Lychrel numbers in fixed bases: A066059 (base 2), A077404 (base 3), A075420 (base 4), A023108 (base 10).

Programs

  • Python
    # Using functions NumToFib and RevFibToNum from A349238.
    n, a = 0, 0
    while n < 53:
        a += 1
        aa, sa = a, NumToFib(a)
        ar, s = RevFibToNum(sa), 0
        while aa != ar and s < 10000:
            s, aa = s+1, aa+ar
            sa = NumToFib(aa)
            ar = RevFibToNum(sa)
        if aa != ar:
            n += 1
            print(a, end = ", ")

A091680 Smallest number whose base-4 Reverse and Add! trajectory (presumably) contains exactly n base-4 palindromes, or -1 if there is no such number.

Original entry on oeis.org

290, 78, 18, 6, 3, 36, 21, 19, 7, 8, 4, 2, 1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 0

Views

Author

Klaus Brockhaus, Jan 28 2004

Keywords

Comments

Conjecture 1: For each k > 0 the trajectory of k eventually leads to a term in the trajectory of some j which belongs to A075421, i.e., whose trajectory (presumably) never leads to a palindrome. Conjecture 2: There is no k > 0 such that the trajectory of k contains more than twelve palindromes, i.e., a(n) = -1 for n > 12.
Base-4 analog of A077594.

Examples

			a(4) = 3 since the trajectory of 3 contains the four palindromes 3, 15, 975, 64575 (3, 33, 33033, 3330333 in base 4) and at 20966400 joins the trajectory of 318 = A075421(2) and the trajectories of 1 (A035524) and 2 do not contain exactly four palindromes.
		

Crossrefs

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

Original entry on oeis.org

708, 718, 723, 731, 733, 743, 828, 838, 843, 851, 853, 863, 958, 963, 983, 1078, 1083, 1103, 1203, 1299, 1309, 1332, 1342, 1347, 1350, 1355, 1357, 1359, 1367, 1419, 1429, 1452, 1462, 1467, 1475, 1477, 1479, 1487, 1499, 1539, 1582, 1607, 1619, 1659, 1702, 1707, 1727, 1739, 1779, 1827, 1859, 1923, 1933, 1956
Offset: 1

Views

Author

A.H.M. Smeets, Feb 10 2019

Keywords

Comments

Base-5 analog of A066059 (base 2), A077404 (base 3), A075420 (base 4) and A023108 (base 10).
All terms are tested up to 200 iteration steps, i.e., within 200 steps no palindrome was reached.

Crossrefs

Showing 1-8 of 8 results.