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 51-60 of 70 results. Next

A063056 a(n) = number of 'Reverse and Add!' operations that have to be applied to the n-th term of A063055 in order to obtain a term in the trajectory of 1997.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Jul 07 2001

Keywords

Examples

			3995 is a term of A063055. One 'Reverse and Add!' operation applied to 3995 leads to a term (9988) in the trajectory of 1997, so the corresponding term of the present sequence is 1.
		

Crossrefs

A063059 a(n) = number of 'Reverse and Add!' operations that have to be applied to the n-th term of A063058 in order to obtain a term in the trajectory of 7059.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Jul 07 2001

Keywords

Examples

			7239 is a term of A063058. One 'Reverse and Add!' operation applied to 7239 leads to a term (16566) in the trajectory of 7059, so the corresponding term of the present sequence is 1.
		

Crossrefs

A063062 a(n) = number of 'Reverse and Add!' operations that have to be applied to the n-th term of A063061 in order to obtain a term in the trajectory of 10553.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Jul 07 2001

Keywords

Examples

			12097 is a term of A063061. One 'Reverse and Add!' operation applied to 12097 leads to a term (91118) in the trajectory of 10553, so the corresponding term of the present sequence is 1.
		

Crossrefs

A063435 Number of 'Reverse and Add!' operations that have to be applied to the n-th term of A063434 in order to obtain a term in the trajectory of 10577.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Jul 20 2001

Keywords

Examples

			12557 is a term of A063434. One 'Reverse and Add!' operation applied to 12557 leads to a term (88078) in the trajectory of 10577, so the corresponding term of the present sequence is 1.
		

Crossrefs

A066056 Number of 'Reverse and Add!' operations that have to be applied to the n-th term of A066055 in order to obtain a term in the trajectory of 10583.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Nov 30 2001

Keywords

Examples

			13597 is the fourth term of A066055. Three 'Reverse and Add!' operations applied to 13597 lead to a term (937838) in the trajectory of 10583, so the corresponding term of the present sequence is 3.
		

Crossrefs

A089381 L-th order palindromes with L > 2.

Original entry on oeis.org

10917, 11907, 11997, 12987, 13977, 14967, 15957, 16947, 17937, 18927, 19917, 20997, 21834, 21987, 22977, 23814, 23967, 23994, 24957, 25497, 25947, 25974, 26487, 26937, 27477, 27927, 27954, 28467, 28917, 29457, 29907, 29934, 30915
Offset: 1

Views

Author

Darrell Plank (jar_czar(AT)msn.com), Dec 28 2003

Keywords

Comments

Let P(m) = m/2 if m is even, m + rev(m) if m is odd, where rev(m) is m's base 10 representation reversed. It is conjectured that any number k eventually cycles when P is repeatedly applied to it. If the cycle has length L, k is called an L-th order palindrome.
It has not been proved that every number eventually cycles, but all numbers less than a million do. Palindromes of order L > 2 seem to be quite rare. 10917 is the smallest and has order 7. There are 263 less than 100000 and 7745 less than 1000000.
The first number with L > 2 that doesn't end in the same cycle as 10917 is 1000353. Other cycles are known, most of them fairly small, but one has length 327 (starting with 1447132589595).
There are an infinite number of different cycles of length 7 because one can insert any number of 9's in the middle of a number in the 7th-order cycle and get a new cycle of length 7 - e.g., taking the number 13748625 from the cycle, one can produce another cycle from 13749998625.
I believe this is not a straightforward generalization of ordinary palindromes (A002113) - they are not the same as 2nd-order palindromes. - N. J. A. Sloane, Jan 01 2004

Examples

			For most numbers, iterating P produces a cycle of length 2: e.g., 121 -> 242 -> 121 -> ...
The sequence for 10917 is 10917, 82818, 41409, 131823, 459954, 229977, 1009899, 10998900, 5499450, 2749725, 8029197, 15948405, {66433356, 33216678, 16608339, 109989000, 54994500, 27497250, 13748625} where the numbers in the brackets repeat. There are 7 numbers inside the brackets so 10917 is a 7th-order palindrome.
		

References

  • C. A. Pickover, Wonders of Numbers, Adventures in Mathematics, Mind and Meaning, Chapter 58, 'Emordnilap Numbers,' Oxford University Press, N.Y., 2001, pp. 142-144.

Crossrefs

Programs

  • Mathematica
    Step[n_] := If[ EvenQ[n], n/2, n + FromDigits[ Reverse[ IntegerDigits[n]]]]; cPalHash = 1013; clearArray = Array[{} &, cPalHash]; InsertCheck[n_, a_] := Module[{i = Mod[n, cPalHash] + 1}, a[[i]] = Append[ a[[i]], n]]; SetAttributes[ InsertCheck, HoldRest]; CheckArray[n_, a_] := MemberQ[ a[[Mod[n, cPalHash] + 1]], n]; SetAttributes[ CheckArray, HoldRest]; PalListHelper[n_, cTries_] := Module[ {ch = clearArray}, NestWhileList[ (InsertCheck[ #, ch]; Step[ # ]) &, n, Not[CheckArray[ #, ch]] &, 1, cTries]]; PalList[n_, cTries_] := Module[ {lst, nRemoved, loop}, lst = PalListHelper[n, cTries]; nRemoved = First[ First[ Position[ lst, lst[[ -1]]]]]; loop = Drop[ Take[ lst, {nRemoved, -1}], -1]; Append[ Take[ lst, {1, nRemoved - 1}], loop]]; Select[ Range[ 31000], Length[ PalList[ #, 1013][[ -1]]] > 2 &]

Extensions

Edited by Robert G. Wilson v and N. J. A. Sloane, Dec 31 2003

A225538 Let r(n) denote the reverse of n. For every n, consider the sequence n_1 = n + 1 + r(n+1), and for m >= 2, n_m = n_(m-1) + 1 + r(n_(m-1) + 1). a(n) is the least m for which n_m is a palindrome, or 0 if there is no such m.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, May 10 2013

Keywords

Comments

Conjecture: the least n's for which a(n) = 0 are 1895, 1985, 2894, 2984, 3893, and 3983. - Peter J. C. Moses, May 10 2013
See analogous numbers in A023108 for which the so-called Lychrel process "Reverse and Add!", apparently, never leads to a palindrome.

Examples

			For n=8, 9 + 9 = 18, 19 + 91 = 110, 111 + 111 = 222 is a palindrome. Thus a(8)=3.
		

Crossrefs

Cf. A023108.

A260726 a(n) = smallest palindrome k > n such that k/n is a square; a(n) = 0 if no solution exists.

Original entry on oeis.org

4, 8, 363, 484, 5445, 46464, 252, 2138312, 12321, 0, 44, 23232, 31213, 686, 53187678135, 44944, 272, 24642, 171, 0, 525, 88, 575, 46464, 5221225, 62426, 36963, 252, 464, 0, 1783799973871, 291080192, 2112, 4114, 53235, 69696, 333, 20102, 93639, 0, 656, 858858
Offset: 1

Views

Author

Pieter Post, Jul 30 2015

Keywords

Comments

If n is a multiple of 10 then a(n) = 0, since no palindrome ends in 0.
Up to 200 only 3 terms are currently unknown, a(125) > 5.2*10^28, a(177) > 3.5*10^27 and a(185) > 4.5*10^27. See Links for a table of known values. - Giovanni Resta, Aug 05 2015
If a(125) > 0, then the first 3 digits of a(125) are 521 and the last 3 digits of a(125) are 125. Proof: Let m^2 = a(125)/125. Then m is odd as otherwise 125*m^2 is a multiple of 10 which is not a palindrome. Since m is odd, m^2 == 1 mod 8 and thus 125*m^2 == 125 mod 1000. - Chai Wah Wu, Mar 31 2016

Examples

			a(3) = 363, because 363/3 = 11^2. 363 * 3 = 1089, which is also a square.
a(15) = 53187678135, because 53187678135/15 = 59547^2 and 53187678135 * 15 = 893205^2.
		

Crossrefs

Programs

  • Maple
    ispali:= proc(n) local L; L:= convert(n,base,10); ListTools:-Reverse(L)=L end proc:
    f:= proc(n) local m;
       if n mod 10 = 0 then return 0 fi;
       for m from 2 to 10^6 do if ispali(m^2*n) then return m^2*n fi od:
       -1  # signals time-out
    end proc:
    seq(f(n), n=1..50); # Robert Israel, Aug 21 2015
  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; a[n_] := If[ Mod[n, 10] == 0, 0, Block[{q = 2}, While[! palQ[q^2 * n], q++]; q^2 * n]]; Array[a, 42] (* Giovanni Resta, Aug 18 2015 *)
  • Python
    def a(n):
        if n % 10 == 0: return 0
        for c in range(2, 10**8):
            k = str(n * c**2)
            if k == k[::-1]:
                return int(k)
        return -1
    print(*[a(n) for n in range(1, 43)], sep=', ')
    # Corrected by David Radcliffe, May 10 2025

Extensions

Missing a(13) from Giovanni Resta, Aug 05 2015

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

A070001 Palindromic integers > 0, whose 'Reverse and Add!' trajectory (presumably) does not lead to another palindrome.

Original entry on oeis.org

4994, 8778, 9999, 11811, 19591, 22822, 23532, 23632, 23932, 24542, 24742, 24842, 24942, 26362, 27372, 29792, 29892, 33933, 34543, 34743, 34943, 39493, 44744, 46064, 46164, 46364, 46564, 46964, 47274, 47574, 48284, 48584, 48684, 48884
Offset: 1

Views

Author

Klaus Brockhaus, May 06 2002

Keywords

Comments

The computation of a trajectory was stopped when in 1000 steps no further palindrome appeared. Subsequence of A002113 and of A023108.

Examples

			The initial terms of the trajectory of the palindromic integer 8778 are 8778, 17556, 83127 and 83127 is the third term in the trajectory of 7059 (see A063057) which (presumably) never leads to a palindrome (see A063048), so 8778 is in the present sequence.
		

Crossrefs

Programs

  • PARI
    {stop=1000; for(k=1,50000,m=k; c=0; p=1; while(c0,d=divrem(n,10); n=d[1]; rev=10*rev+d[2]); if(m==k&&rev!=m,p=0); if(m>k&&rev==m,p=0); m=m+rev; c++); if(c==stop&&p==1,print1(k,",")))}
Previous Showing 51-60 of 70 results. Next