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 11-20 of 51 results. Next

A067031 Numbers that are not of the form k + reverse(k) for any k.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 0

Views

Author

Klaus Brockhaus, Dec 29 2001

Keywords

Examples

			3 belongs to the sequence since there is no k such that k + reverse(k) = 3.
		

Crossrefs

Cf. A056964.
Complement of A067030.

Programs

  • ARIBAS
    function a067031(a,b: integer); var k,n,i,rev: integer; test: boolean; st,nst: string; begin for n := a to b do k := 0; test := 1; while test and 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 test := 0; else inc(k); end; end; if k > n then write(n,","); end; end; end; a067031(0,100);
  • Mathematica
    Module[{nn=100,rd},rd=Union[Table[n+FromDigits[ Reverse[ IntegerDigits[ n]]],{n,nn}]];Complement[Range[nn],rd]] (* Harvey P. Dale, Dec 16 2013 *)

A072041 a(n) is the smallest number of the form k + reverse(k) for exactly n integers k, or -1 if no such number exists.

Original entry on oeis.org

1, 0, 22, 33, 44, 55, 66, 77, 88, 99, 1111, -1, 2552, -1, 2662, 3443, 2772, -1, 2882, -1, 2992, 3663, -1, -1, 3773, 5445, -1, 3883, 4664, -1, 3993, -1, 4774, -1, -1, 5665, 4884, -1, -1, -1, 4994, -1, 6666, -1, -1, 5885, -1, -1, 6776, 7667, 5995, -1, -1, -1, 6886
Offset: 0

Views

Author

Klaus Brockhaus, Jun 08 2002

Keywords

Comments

The negative terms are conjectural. Moreover they have a rather low degree of confirmation, since due to the time-consuming computations only numbers from 0 to 65000 have been taken into account. Random tests of larger numbers however seem to indicate, that only selected values of n occur. - In the cognate sequence A071266 two numbers a and b are counted only once, if n = a + b, a = reverse(b), b = reverse(a). Then 33 = 12 + 21 = 30 + 03 has a count of 2 and 44 = 13 + 31 = 22 + 22 = 40 + 04 has a count of 3, so 44 appears in A071266 instead of 33.
Terms are correct for k <= 10^8. - Sean A. Irvine, Aug 27 2024

Examples

			a(0) = 1, since 1 can in no way be written as k + reverse(k); a(1) = 0, since 0 = k + reverse(k) for k = 0; a(3) = 33, since 33 = k + reverse(k) for k = 12, 21 and 30.
		

Crossrefs

A072040 Numbers n of the form k + reverse(k) for exactly two k.

Original entry on oeis.org

22, 187, 202, 222, 242, 262, 282, 302, 322, 342, 362, 382, 1717, 1737, 1757, 1777, 1797, 1817, 1837, 1857, 1877, 1897, 2002, 2871, 3982, 11211, 11411, 11611, 11811, 12011, 12211, 12411, 12611, 12811, 17017, 18128, 18997, 19888, 20002, 20202
Offset: 1

Views

Author

Klaus Brockhaus, Jun 08 2002

Keywords

Comments

In the cognate sequence A071265 two numbers a and b are counted only once, if n = a + b, a = reverse(b), b = reverse(a). Therefore 187 = 89 + 98 = 98 + 89 does not appear in A071265.

Examples

			22 = 11 + 11 = 20 + 02, 187 = 89 + 98 = 98 + 89, 382 = 191 + 191 = 290 + 092.
		

Crossrefs

Programs

  • Maple
    # Maple program from N. J. A. Sloane, Mar 07 2016. Assumes digrev (from the "transforms" file) is available:
    M:=21000; b := Array(1..M,0);
    for n from 1 to M do
    t1:=n+digrev(n);
    if t1 <= M then b[t1]:=b[t1]+1; fi;
    od:
    ans:=[];
    for n from 1 to M do
    if b[n]=2 then ans:=[op(ans),n]; fi; od:
    ans;
  • Mathematica
    M = 10^5; digrev[n_] := IntegerDigits[n] // Reverse // FromDigits; Clear[b]; b[A072040%20=%20Reap%5BFor%5Bn%20=%201,%20n%20%3C=%20M,%20n++,%20If%5Bb%5Bn%5D%20==%202,%20Sow%5Bn%5D%5D%5D%5D%5B%5B2,%201%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]]; A072040 = Reap[For[n = 1, n <= M, n++, If[b[n] == 2, Sow[n]]]][[2, 1]] (* _Jean-François Alcover, Oct 01 2016, after N. J. A. Sloane's Maple code *)

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

A092213 In base 2: numbers n of the form k + reverse(k) for at least one k.

Original entry on oeis.org

0, 2, 3, 5, 6, 9, 10, 14, 15, 17, 18, 21, 24, 25, 27, 30, 33, 34, 35, 37, 42, 44, 45, 51, 52, 54, 57, 62, 63, 65, 66, 69, 75, 78, 81, 84, 85, 90, 93, 96, 99, 101, 102, 105, 108, 114, 115, 119, 121, 126, 129, 130, 133, 135, 139, 146, 149, 150, 153, 155, 164, 165, 166
Offset: 0

Views

Author

Klaus Brockhaus, Feb 25 2004

Keywords

Comments

Base-2 analog of A067030 (base 10) and A091678 (base 4). Complement of A092214.

Examples

			25 is a term since 25 (decimal) = 11001 = 10100 + 00101 = 20 (decimal) + 5 (decimal).
		

Crossrefs

A358985 a(n) is the number of numbers of the form k + reverse(k) for at least one n-digit number k.

Original entry on oeis.org

10, 18, 180, 342, 3420, 6498, 64980, 123462, 1234620, 2345778, 23457780, 44569782, 445697820, 846825858, 8468258580, 16089691302, 160896913020, 305704134738, 3057041347380, 5808378560022, 58083785600220, 110359192640418, 1103591926404180, 2096824660167942
Offset: 1

Views

Author

Jon E. Schoenfield, Dec 08 2022

Keywords

Examples

			There are 10 numbers of the form k + reverse(k) for 1-digit numbers k: 0, 2, 4, 6, 8, 10, 12, 14, 16, and 18, so a(1) = 10.
There are 18 numbers of the form k + reverse(k) for 2-digit numbers k: 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, and 198, so a(2) = 18.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 19}, {10, 18, 180}, 30] (* Paolo Xausa, Oct 04 2024 *)
  • PARI
    a(n) = (18+(n<2))*19^(n\2-1)*10^(n%2); \\ Jinyuan Wang, Dec 14 2022
  • Python
    def A358985(n):
        if n == 1:
            return 10
        kset = set()
        for i in range(10**(n-2),10**(n-1)):
            for j in range(int((s:=str(i))[0])+1):
                kset.add(10*i+j+int(str(j)+s[::-1]))
        return len(kset) # Chai Wah Wu, Dec 09 2022
    

Formula

a(2n+1) = 10*a(2n) for n > 0. - Chai Wah Wu, Dec 09 2022
a(2n) = 19*a(2n-2) for n > 1. - Robert G. Wilson v, Dec 10 2022
a(n) = 19*a(n-2). - Wesley Ivan Hurt, Mar 17 2023

Extensions

More terms from Jinyuan Wang, Dec 14 2022

A367796 Primes p such that the sum of p and its reversal is the square of a prime.

Original entry on oeis.org

2, 29, 47, 83, 20147, 23117, 24107, 63113, 80141, 81131, 261104399, 262005299, 262104299, 262203299, 263302199, 264203099, 264302099, 264500099, 270401489, 271500389, 273104189, 273302189, 274401089, 282203279, 284302079, 284500079, 291104369, 291203369, 292005269, 293005169, 293104169, 294302069
Offset: 1

Views

Author

Robert Israel, Nov 30 2023

Keywords

Comments

Terms > 83 have an odd number of digits and an even first digit.

Examples

			A056964(a(n)) = 121 = 11^2 for 2 <= n <= 4.
A056964(a(n)) = 94249 = 307^2 for 5 <= n <= 10.
A056964(a(n)) = 1254505561 = 35419^2 for 11 <= n <= 71.
		

Crossrefs

Cf. A056964, A067030, A061783. Subset of A367793.

Programs

  • Maple
    digrev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    filter:= proc(t) local v;
      v:= sqrt(t+digrev(t));
      v::integer and isprime(v)
    end proc:
    R:= 2, 29, 47, 83: count:= 4: flag:= true:
    for d from 3 to 9 by 2 do
      p:= prevprime(10^(d-1));
      for i from 1 do
        p:= nextprime(p);
        p1:= floor(p/10^(d-1));
        if p1::odd then p:= nextprime((p1+1)*10^(d-1)) fi;
        if p > 10^d then break fi;
        if filter(p) then
           count:= count+1; R:= R,p;
    fi od od:
    R;
  • Mathematica
    Select[Prime[Range[10^6]], PrimeQ[Sqrt[#+FromDigits[Reverse[IntegerDigits[#]]]]] &] (* Stefano Spezia, Dec 10 2023 *)
  • PARI
    \\ See PARI link

A068062 Palindromes n of the form k + reverse(k) for at least one k.

Original entry on oeis.org

0, 2, 4, 6, 8, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 121, 141, 161, 181, 202, 222, 242, 262, 282, 303, 323, 343, 363, 383, 404, 424, 444, 464, 484, 505, 525, 545, 565, 585, 606, 626, 646, 666, 686, 707, 727, 747, 767, 787, 808, 828, 848, 868, 888, 909, 929
Offset: 1

Views

Author

Klaus Brockhaus, Feb 15 2002

Keywords

Comments

Intersection of A002113 and A067030.

Examples

			33 belongs to this sequence, since 12 + 21 = 33 (cf. A067030).
		

Crossrefs

A305130 Numbers k with the property that there exists a positive integer M, called multiplier, such that the sum of the digits of k times the multiplier added to the reversal of this product gives k.

Original entry on oeis.org

10, 11, 12, 18, 22, 33, 44, 55, 66, 77, 88, 99, 101, 110, 121, 132, 141, 165, 181, 201, 202, 221, 222, 261, 262, 282, 302, 303, 322, 323, 342, 343, 363, 403, 404, 423, 424, 444, 463, 483, 504, 505, 525, 545, 564, 584, 585, 605, 606, 645, 646, 666, 686, 706
Offset: 1

Views

Author

Viorel Nitica, May 26 2018

Keywords

Comments

These numbers are related to the taxicab number 1729. This is why they might be called "additive Hardy-Ramanujan numbers".

Examples

			For k = 11 the sum of the digits is 2 and the multiplier is 5: 2 * 5 = 10 and 10 + 01 = 11.
For k = 747 the sum of the digits is 18 and the multiplier is 7: 18 * 7 = 126 and 126 + 621 = 747.
		

Crossrefs

Subsequence of A067030.

Programs

  • Mathematica
    Block[{k, d, j}, Reap[Do[k = 1; d = Total@ IntegerDigits[i]; While[Nor[k > i, Set[j, # + IntegerReverse@ #] == i &[d k]], k++]; If[j == i, Sow[{i, k}]], {i, 720}]][[-1, 1, All, 1]] ] (* Michael De Vlieger, Jan 28 2020 *)
Previous Showing 11-20 of 51 results. Next