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 21-30 of 32 results. Next

A065213 Numbers which need eight 'Reverse and Add' steps to reach a palindrome.

Original entry on oeis.org

193, 391, 490, 589, 688, 886, 985, 1993, 1995, 2994, 3991, 4990, 4992, 5991, 6990, 8059, 8149, 8239, 8329, 8419, 8509, 8599, 8689, 8779, 8869, 8959, 9058, 9069, 9089, 9148, 9159, 9179, 9238, 9249, 9269, 9328, 9359, 9418, 9429, 9508, 9519, 9539, 9598
Offset: 1

Views

Author

Klaus Brockhaus, Oct 21 2001

Keywords

Comments

The number of steps starts at 0, so palindromes (cf. A002113) are excluded.
Numbers k such that A033665(k) = 8. - Andrew Howroyd, Dec 08 2024

Crossrefs

Programs

  • Mathematica
    lenQ[n_]:=Length[NestWhileList[#+FromDigits[Reverse[IntegerDigits[#]]]&, n, #!=FromDigits[Reverse[IntegerDigits[#]]]&,1,10]]==9; Select[Range[ 10000], lenQ] (* Harvey P. Dale, Aug 09 2013 *)

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Oct 14 2009

A065214 Numbers which need nine 'Reverse and Add' steps to reach a palindrome.

Original entry on oeis.org

1397, 1487, 1577, 1667, 1757, 1847, 1937, 2396, 2486, 2576, 2666, 2756, 2846, 2936, 2999, 3395, 3485, 3575, 3665, 3755, 3845, 3935, 3998, 4394, 4484, 4574, 4754, 4844, 4934, 4997, 5393, 5483, 5573, 5663, 5753, 5843, 5933, 5996, 6392, 6482, 6572
Offset: 1

Views

Author

Klaus Brockhaus, Oct 21 2001

Keywords

Comments

The number of steps starts at 0, so palindromes (cf. A002113) are excluded.
Numbers k such that A033665(k) = 9. - Andrew Howroyd, Dec 08 2024

Crossrefs

Cf. A002113, A033665, A065206. Different from A015990.

Programs

  • Mathematica
    lenQ[n_]:= Length[NestWhileList[# + FromDigits[Reverse[IntegerDigits[#]]]&, n, #!= FromDigits[Reverse[IntegerDigits[#]]]&, 1, 10]] == 10; Select[Range[1000], lenQ] (* Vincenzo Librandi, Sep 24 2013 *)

A065215 Numbers which need ten 'Reverse and Add' steps to reach a palindrome.

Original entry on oeis.org

829, 928, 9059, 9149, 9239, 9329, 9419, 9509, 9599, 9689, 9869, 9959, 10634, 10637, 10687, 10716, 10808, 10834, 10838, 10867, 10873, 10898, 10927, 10979, 11398, 11624, 11627, 11677, 11706, 11824, 11828, 11857, 11863, 11888, 11917, 11969, 12388, 12392, 12398, 12493
Offset: 1

Views

Author

Klaus Brockhaus, Oct 21 2001

Keywords

Comments

The number of steps starts at 0, so palindromes (cf. A002113) are excluded.
Numbers k such that A033665(k) = 10. - Andrew Howroyd, Dec 08 2024

Crossrefs

Cf. A002113, A015991 (a different version), A033665, A065206.

Programs

  • Mathematica
    lenQ[n_]:= Length[NestWhileList[# + FromDigits[Reverse[IntegerDigits[#]]]&, n, #!= FromDigits[Reverse[IntegerDigits[#]]]&, 1, 11]] == 11; Select[Range[1000], lenQ] (* Vincenzo Librandi, Sep 24 2013 *)

A065216 Numbers which need eleven 'Reverse and Add' steps to reach a palindrome.

Original entry on oeis.org

167, 266, 365, 563, 662, 761, 860, 7069, 7159, 7249, 7339, 7429, 7519, 7609, 7699, 7789, 7879, 7969, 8068, 8158, 8248, 8428, 8518, 8608, 8698, 8788, 8878, 8968, 9039, 9067, 9129, 9157, 9219, 9247, 9309, 9337, 9399, 9427, 9489, 9517, 9579, 9607, 9697
Offset: 1

Views

Author

Klaus Brockhaus, Oct 21 2001

Keywords

Comments

The number of steps starts at 0, so palindromes (cf. A002113) are excluded.
Numbers k such that A033665(k) = 11. - Andrew Howroyd, Dec 08 2024

Crossrefs

Programs

  • Mathematica
    lenQ[n_]:= Length[NestWhileList[# + FromDigits[Reverse[IntegerDigits[#]]]&, n, #!= FromDigits[Reverse[IntegerDigits[#]]]&, 1, 12]] == 12; Select[Range[1000], lenQ] (* Vincenzo Librandi, Sep 24 2013 *)

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Oct 14 2009

A065217 Numbers which need 12 'Reverse and Add' steps to reach a palindrome.

Original entry on oeis.org

2069, 2159, 2249, 2339, 2429, 2519, 2609, 2699, 2789, 2879, 2969, 3068, 3158, 3248, 3338, 3428, 3518, 3608, 3698, 3788, 3878, 3968, 4067, 4157, 4247, 4337, 4427, 4517, 4607, 4697, 4787, 4877, 4967, 5066, 5156, 5246, 5336, 5426, 5516, 5606, 5696, 5786
Offset: 1

Views

Author

Klaus Brockhaus, Oct 21 2001

Keywords

Comments

The number of steps starts at 0, so palindromes (cf. A002113) are excluded. This sequence coincides with the corresponding sequence not excluding palindromes (A015993) for the entries shown in the database. The first divergence occurs at 10901.
Numbers k such that A033665(k) = 12. - Andrew Howroyd, Dec 06 2024

Crossrefs

Programs

  • PARI
    isok(n,s=12)={for(k=0, s, my(r=fromdigits(Vecrev(digits(n)))); if(r==n, return(k==s)); n += r); 0} \\ Andrew Howroyd, Dec 06 2024

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Oct 14 2009

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;.

A015994 Smallest k such that the smallest palindrome > k in the Reverse and Add! trajectory of k is reached after exactly n iterations.

Original entry on oeis.org

1, 5, 59, 69, 166, 79, 188, 193, 1397, 829, 167, 2069, 1797, 849, 177, 999, 739, 1798, 989, 6999, 1297, 869, 187, 89, 10797, 10853, 10921, 10971, 13297, 10548, 13293, 17793, 20889, 700269, 106977, 108933, 80359, 13697, 10794, 15891, 1009227, 1007619, 1009246
Offset: 1

Views

Author

Felix Fröhlich, May 28 2022; original entry N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Variant of A023109 allowing k to be palindromic itself.
Smallest k such that A033665(k) = n.

Crossrefs

Cf. A023109.

Programs

  • PARI
    iterationstosmallestpalindrome(n, bound) = my(x=n, i=0, d); while(1, if(i > bound, return(-1)); x=x+eval(concat(Vecrev(Str(x)))); i++; d=digits(x); if(d==Vecrev(d), return(i)))
    a(n) = for(k=1, oo, if(iterationstosmallestpalindrome(k, n)==n, return(k))) \\ Felix Fröhlich, May 28 2022

Extensions

Keyword "dead" removed, more terms added and entry revised by Felix Fröhlich, May 28 2022; Jun 22 2022

A030547 Number of terms (including the initial term) needed to reach a palindrome when the Reverse Then Add! map (x -> x + (x-with-digits-reversed)) is repeatedly applied to n, or -1 if a palindrome is never reached.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 2, 2, 2, 2, 1, 2, 3, 3, 4, 2, 2, 2, 2, 3, 2, 1, 3, 4, 5, 2, 2, 2, 3, 2, 3, 3, 1, 5, 7, 2, 2, 3, 2, 3, 3, 4, 5, 1, 25, 2, 3, 2, 3, 3, 4, 5, 7, 25
Offset: 1

Views

Author

Keywords

Comments

It is conjectured that a(196) is the smallest term equal to -1. See A023108.

References

  • Daniel Lignon, Dictionnaire de (presque) tous les nombres entiers, Ellipses, Paris, 2012, 702 pages. See Entry 196.

Crossrefs

Cf. A006960, A023108, A063018, etc.
Equals A033665(n) + 1.

Programs

  • Mathematica
    Table[Length@
      NestWhileList[# + IntegerReverse[#] &, n, ! PalindromeQ[#]  &], {n, 98}] (* Robert Price, Oct 18 2019 *)

Extensions

Edited by N. J. A. Sloane, May 09 2015

A072138 Smallest k whose 'Reverse and Subtract' trajectory has a preperiodic part of length n.

Original entry on oeis.org

0, 1, 10, 16, 14, 15, 13, 1011, 1017, 1037, 1027, 1014, 1013, 1028, 100113, 100104, 100145, 100134, 100103, 100112, 100133, 100187, 100114, 100128, 100194, 100107, 100307, 100277, 100413, 100345, 100429, 100215, 100427, 100214, 100433, 100335
Offset: 0

Views

Author

Klaus Brockhaus, Jun 24 2002

Keywords

Comments

'Reverse and Subtract' (cf. A072137) is defined by x -> |x - reverse(x)|. For small n the last term of the preperiodic part of the trajectory (cf. A072139) is a palindrome, so this sequence is a weak analog of A033665, which uses 'Reverse and Add'. - 1012 is the first n such that last term of the preperiodic part is not palindromic (cf. A072140).

Examples

			a(8) = 1017, since 1017 is the smallest number whose 'Reverse and Subtract' trajectory has eight preperiodic terms: 1017 -> 6084 -> 1278 -> 7443 -> 3996 -> 2997 -> 4995 -> 999.
		

Crossrefs

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;
Previous Showing 21-30 of 32 results. Next