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 18 results. Next

A067284 a(n) = number of integers k such that k is not of the form m + reverse(m) for any m (cf. A067031) and A067030(n) occurs in the 'Reverse and Add' trajectory of k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 5, 8, 7, 12, 9, 1, 13, 21, 14, 1, 6, 11, 1, 4, 14, 1, 2, 9, 1, 2, 1, 2, 1, 22, 1, 2, 1, 2, 2, 3, 2, 3, 2, 3, 2, 16, 2, 3, 3, 5, 3, 4, 3, 5, 3, 4, 3, 30, 4, 6, 5, 5, 4, 6, 5, 5, 4, 6, 15, 8, 6, 6, 5, 8, 6, 6, 5, 8, 6, 9, 24, 7, 6, 9, 8, 7, 6, 9, 7, 12, 9, 8, 20
Offset: 0

Views

Author

Klaus Brockhaus, Feb 04 2002

Keywords

Comments

For an integer j not in A067030 there exists no integer k of the form m + reverse(m) such that j occurs in the trajectory of k. a(n) >= A067032(n); A067737 gives the terms of A067030 such that a(n) > A067032(n). A067288 gives the records in this sequence, A067287 gives the terms of A067030 at which these records are attained.

Examples

			a(14) = 5, since A067030(14) = 55 and the five integers 7, 23, 32, 41, 50 are not of the form m + reverse(m) for any m and 55 occurs in the trajectory of each of them. a(25) = 11, since A067030(25) = 154 and the eleven integers 1, 25, 34, 43, 52, 59, 61, 68, 70, 86, 95 are not of the form m + reverse(m) for any m and 154 occurs in the trajectory of each of them.
		

Crossrefs

A067286 a(n) = largest integer k such that k is not of the form m + reverse(m) for any m (cf. A067031) and A067030(n) occurs in the 'Reverse and Add' trajectory of k.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 5, 3, 7, 1, 9, 20, 30, 40, 50, 60, 70, 80, 90, 100, 91, 92, 93, 120, 94, 95, 130, 96, 97, 140, 98, 90, 150, 200, 160, 210, 170, 220, 180, 230, 190, 240, 250, 300, 260, 310, 270, 320, 280, 330, 290, 340, 350, 400, 360, 410, 370, 420, 380, 430, 390
Offset: 0

Views

Author

Klaus Brockhaus, Feb 04 2002

Keywords

Comments

a(n) <= A067034(n). If A067034(n) is in A067030 then a(n) < A067034(n), otherwise a(n) = A067034(n).

Examples

			a(14) = 50, since A067030(14) = 55 and the five integers 7, 23, 32, 41, 50 are not of the form m + reverse(m) for any m, 55 occurs in the trajectory of each of them and 50 is the largest one. a(25) = 95, since A067030(25) = 154 and the eleven integers 1, 25, 34, 43, 52, 59, 61, 68, 70, 86, 95 are not of the form m + reverse(m) for any m, 154 occurs in the trajectory of each of them and 95 is the largest one.
		

Crossrefs

A067285 a(n) = smallest integer k such that k is not of the form m + reverse(m) for any m (cf. A067031) and A067030(n) occurs in the 'Reverse and Add' trajectory of k.

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 5, 3, 7, 1, 9, 5, 3, 5, 7, 3, 1, 5, 9, 100, 7, 7, 3, 120, 49, 1, 130, 69, 5, 140, 89, 9, 150, 100, 160, 111, 170, 7, 180, 131, 190, 120, 151, 102, 130, 112, 171, 122, 140, 3, 191, 142, 152, 100, 162, 113, 172, 111, 182, 133, 192, 7, 153, 104, 131, 114
Offset: 0

Views

Author

Klaus Brockhaus, Feb 04 2002

Keywords

Comments

a(n) <= A067033(n).

Examples

			a(14) = 7, since A067030(14) = 55 and the five integers 7, 23, 32, 41, 50 are not of the form m + reverse(m) for any m, 55 occurs in the trajectory of each of them and 7 is the smallest one. a(25) = 1, since A067030(25) = 154 and the eleven integers 1, 25, 34, 43, 52, 59, 61, 68, 70, 86, 95 are not of the form m + reverse(m) for any m, 154 occurs in the trajectory of each of them and 1 is the smallest one.
		

Crossrefs

A067030 Numbers of the form k + reverse(k) for at least one k.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 11, 12, 14, 16, 18, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 121, 132, 141, 143, 154, 161, 165, 176, 181, 187, 198, 201, 202, 221, 222, 241, 242, 261, 262, 281, 282, 302, 303, 322, 323, 342, 343, 362, 363, 382, 383, 403, 404, 423, 424, 443
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Comments

From Avik Roy (avik_3.1416(AT)yahoo.co.in), Feb 02 2009: (Start)
Any (k+1)-digit number m can be represented as
m = Sum_{i=0..k} (ai*10^i).
Reverse(m) = Sum_{i=0..k} (ai*10^(k-i)).
m+Reverse(m) = Sum_{i=0..k} (ai*(10^i+10^(k-i))).
The last formula can produce all the terms of this sequence; the order of terms is explicitly determined by the order of ai's (repetition of terms might not be avoided). (End)

Examples

			0 belongs to the sequence since 0 + 0 = 0;
33 belongs to the sequence since 12 + 21 = 33.
		

Crossrefs

Programs

  • ARIBAS
    function Reverse(n: integer): integer; var i: integer; str, rev: string;
    begin str := itoa(n); rev := "";
    for i := 0 to length(str)-1 do rev := concat(str[i], rev); end;
    return atoi(rev); end Reverse;
    function A067030(a, b: integer); var k, n: integer;
    begin for n := a to b do k := 0; while k <= n do
    if n = k+Reverse(k) then write(n, ", "); break; else inc(k); end;
    end; end; end A067030;
    A067030(0, 500) (* revised by Klaus Brockhaus, May 04 2011 *).
    
  • Magma
    A067030:=function(a, b); S:=[]; for n in [a..b] do k:=0; while k le n do if n eq k+Seqint(Reverse(Intseq(k))) then Append(~S, n); break; else k+:=1; end if; end while; end for; return S; end function; A067030(0, 500); // Klaus Brockhaus, May 04 2011
    
  • Mathematica
    M = 10^3; digrev[n_] := IntegerDigits[n] // Reverse // FromDigits; Clear[b]; b[A067030%20=%20Join%5B%7B0%7D,%20Reap%5BFor%5Bn%20=%201,%20n%20%3C=%20M,%20n++,%20If%5Bb%5Bn%5D%20%3E=%201,%20Sow%5Bn%5D%5D%5D%5D%5B%5B2,%201%5D%5D%5D%20(*%20_Jean-Fran%C3%A7ois%20Alcover">] = 0; For[n = 1, n <= M, n++, t1 = n + digrev[n]; If[t1 <= M, b[t1] = b[t1] + 1]]; A067030 = Join[{0}, Reap[For[n = 1, n <= M, n++, If[b[n] >= 1, Sow[n]]]][[2, 1]]] (* _Jean-François Alcover, Oct 01 2016, after N. J. A. Sloane's Maple code in A072040 *)
    max = 1000; l = ConstantArray[0, max]; Do[s = n + IntegerReverse@n; If[s <= max, l[[s]]++], {n, max}]; Flatten@{0, Position[l, ?(# != 0 &)]} (* _Hans Rudolf Widmer, Dec 25 2022 *)
  • Python
    def aupto(lim): return sorted(set(t for t in (k + int(str(k)[::-1]) for k in range(lim+1)) if t <= lim))
    print(aupto(443)) # Michael S. Branicky, Dec 25 2022

A070788 Positive integers n such that the Reverse and Add! trajectory of n (presumably) does not join the trajectory of any m < n.

Original entry on oeis.org

1, 3, 5, 7, 9, 100, 102, 106, 108, 111, 112, 113, 114, 116, 117, 118, 119, 122, 124, 128, 133, 135, 137, 138, 166, 184, 186, 196, 199, 359, 399, 459, 539, 659, 679, 739, 759, 779, 799, 859, 879, 919, 939, 959, 979, 999, 1000, 1006, 1011, 1013, 1022, 1033, 1037
Offset: 1

Views

Author

Klaus Brockhaus, May 07 2002, revised Oct 15 2003

Keywords

Comments

The conjecture that the trajectories of the terms of this sequence do not join is based on the observation that if the trajectories of two integers below 10000 join, this happens after at most 15 steps, while for any two terms the trajectories do not join within 1200 steps. For pairs from 1, 3, 5, 7, 9, 100, 102, 106 this has even been checked for 10000 steps.
The positive integers are the domain of the equivalence relation 'the trajectories of a and b join'; each of its presumably infinitely many equivalence classes is represented by a term of this sequence. Each class contains infinitely many integers (cf. A070789 - A070798). In such a class the relation 'the trajectory of a is part of the trajectory of b' is a partial order for which a term c is a maximal element if it is in A067031 (integers not of the form k + reverse(k) for any k) and the integer at which the trajectories of a and b join is the greatest lower bound of a and b.

Examples

			The trajectory of 2 is part of the trajectory of 1; the trajectory of 3 does not join the trajectory of 1 within 10000 steps; the trajectory of 5 does not join the trajectory of 1 or of 3 within 10000 steps.
		

Crossrefs

Programs

  • Mathematica
    limit = 10^3; utraj = {};
    Select[Range[1037], (x = NestList[ # + IntegerReverse[#] &, #, limit]; If[Intersection[x, utraj] == {}, utraj = Union[utraj, x]; True, utraj = Union[utraj, x]]) &] (* Robert Price, Oct 20 2019 *)

A067032 Number of k's such that A067030(n) = k + reverse(k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 9, 9, 7, 1, 6, 5, 1, 4, 3, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 8, 9, 8
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			a(12) = 3 since A067030(12) = 33 and for k = 12, 21, 30 we have 33 = k + reverse(k).
		

Crossrefs

Programs

  • ARIBAS
    function a067032(a,b: integer); var n,k,c,i,rev: integer; st,nst: string; begin for n := a to b do k := 0; c := 0; while k <= n do st := itoa(k); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i],nst); end; rev := atoi(nst); if n = k + rev then inc(c); end; inc(k); end; if c > 0 then write(c,","); end; end; end; a067032(0,1000);

A067034 Largest k such that A067030(n) = k + reverse(k).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 8, 9, 20, 30, 40, 50, 60, 70, 80, 90, 100, 91, 110, 93, 120, 94, 95, 130, 96, 97, 140, 98, 99, 150, 200, 160, 210, 170, 220, 180, 230, 190, 240, 250, 300, 260, 310, 270, 320, 280, 330, 290, 340, 350, 400, 360, 410, 370, 420, 380, 430
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			a(12) = 30 since A067030(12) = 33 and 30 is the largest k such that 33 = k + reverse(k).
		

Crossrefs

Programs

  • ARIBAS
    function a067034(a,b: integer); var n,k,m,i,rev: integer; st,nst: string; begin for n := a to b do k := 0; m := -1; while k <= n do st := itoa(k); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i],nst); end; rev := atoi(nst); if n = k + rev then m := k; end; inc(k); end; if m >= 0 then write(m,","); end; end; end; a067034(0,500);

A067033 Smallest k such that A067030(n) = k + reverse(k).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 100, 19, 29, 39, 120, 49, 59, 130, 69, 79, 140, 89, 99, 150, 101, 160, 111, 170, 121, 180, 131, 190, 141, 151, 102, 161, 112, 171, 122, 181, 132, 191, 142, 152, 103, 162, 113, 172, 123, 182, 133, 192
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			a(12) = 12 since A067030(12) = 33 and 12 is the smallest k such that 33 = k + reverse(k).
		

Crossrefs

Programs

  • ARIBAS
    function a067033(a,b: integer); var n,k,i,rev: integer; st,nst: string; begin for n := a to b do k := 0; while k <= n do st := itoa(k); nst := ""; for i := 0 to length(st) - 1 do nst := concat(st[i],nst); end; rev := atoi(nst); if n = k + rev then write(k,",") k := n + 1; else inc(k); end; end; end; end; a067033(0,500);

A067035 n sets a new record for the number of integers k such that n = k + reverse(k).

Original entry on oeis.org

0, 22, 33, 44, 55, 66, 77, 88, 99, 1111, 2552, 2662, 2772, 2882, 2992, 3663, 3773, 3883, 3993, 4774, 4884, 4994, 5885, 5995, 6886, 6996, 7887, 7997, 8888, 8998, 9889, 9999, 199991, 258852, 259952, 268862, 269962, 278872, 279972, 288882, 289982
Offset: 1

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Comments

RECORDS transform of A067032. A067036 gives the corresponding records.
Are all terms palindromes? - David A. Corneth, Jan 16 2020

Examples

			33 belongs to the sequence because for three integers k (cf. A067032) we have 33 = k + reverse(k) and for m < 33 there are at most two integers j such that m = j + reverse(j).
		

Crossrefs

Extensions

Offset set to 1 by Giovanni Resta, Jan 16 2020

A067036 Records for the number of integers k such that an integer is of the form k + reverse(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 21, 24, 27, 30, 32, 36, 40, 45, 50, 54, 60, 63, 70, 72, 80, 81, 90, 100, 108, 120, 126, 140, 144, 160, 162, 180, 200, 210, 216, 240, 243, 270, 300, 320, 324, 360, 400, 405, 450, 500, 540, 600, 630, 700, 720, 800, 810
Offset: 1

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Comments

RECORDS transform of A067032. A067035 gives the corresponding integers at which these records are attained.

Examples

			3 is a record since there is an integer n (viz. 33, cf. A067032) such that for three integers k we have n = k + reverse(k) and for m < n there are at most two integers j such that m = j + reverse(j).
		

Crossrefs

Extensions

Offset set to 1 by Giovanni Resta, Jan 16 2020
Showing 1-10 of 18 results. Next