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 71-80 of 83 results. Next

A366080 Numbers that give a perfect power when added to their reverse.

Original entry on oeis.org

2, 4, 8, 29, 38, 47, 56, 65, 74, 83, 92, 110, 122, 143, 164, 198, 221, 242, 263, 297, 320, 341, 362, 396, 440, 461, 495, 560, 594, 693, 792, 891, 990, 1030, 1120, 1210, 1300, 10100, 10148, 10340, 10395, 10403, 10683, 10908, 10980, 11138, 11330, 11385, 11673
Offset: 1

Views

Author

Tanmaya Mohanty, Oct 24 2023

Keywords

Examples

			8 is a term because 8 + 8 = 16 = 2^4 or 4^2.
10340 is a term because 10340 + 04301 = 14641 is a perfect power 11^4.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,i,x;
      L:= convert(n,base,10);
      x:= add(10^(i-1)*L[-i],i=1..nops(L));
      igcd(ifactors(n+x)[2][..,2])>1;
    end proc:
    select(filter, [$1..20000]); # Robert Israel, Oct 24 2023
  • PARI
    isok(k) = ispower(k + fromdigits(Vecrev(digits(k)))); \\ Michel Marcus, Oct 24 2023

Extensions

More terms from Robert Israel, Oct 24 2023

A371031 Number of distinct integers resulting from adding an n-digit non-multiple of 10 and its reverse.

Original entry on oeis.org

9, 17, 170, 323, 3230, 6137, 61370, 116603, 1166030, 2215457
Offset: 1

Views

Author

César Eliud Lozada, Mar 08 2024

Keywords

Examples

			For n=2 there are 81 2-digit numbers not ending with 0: {11, 12, 13, ..., 99}. There are 17 distinct results when adding each of these to their reversal: {22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198}. Therefore a(2) = 17.
		

Crossrefs

Programs

  • Mathematica
    A371031[n_] :=
    Module[{nn, ss},
      nn = Select[Range[If[n == 1, 1, 10^(n - 1) + 1], 10^n - 1], Mod[#, 10] > 0 &];
      ss = Map[# + FromDigits[Reverse[IntegerDigits[#]]] &, nn];
      Return[CountDistinct[ss]]
    ];
    Map[A371031[#]&, Range[7]]

Formula

For n > 1, empirically a(n+1) = 10 a(n) if n even, 19 a(n) / 10 if n odd, and thus a(n+2) = 19 a(n). - Michael S. Branicky, Mar 31 2024

Extensions

a(9)-a(10) from Michael S. Branicky, Mar 30 2024

A055960 n + reversal of base 11 digits of n (written in base 10).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 60, 72, 84, 96, 108, 120, 132, 144
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of digits in base 11 then a(n) is a multiple of 12.

Crossrefs

Programs

  • Mathematica
    Table[n+IntegerReverse[n,11],{n,0,70}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 30 2016 *)

Formula

a(n) = n + A056960(n).

A055964 n + reversal of hexadecimal (base 16) digits of n (written in base 10).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 272, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 272, 289, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of hexadecimal digits then a(n) is a multiple of 17.

Crossrefs

Programs

  • Mathematica
    Table[n + IntegerReverse[n, 16], {n, 0, 100}] (* Paolo Xausa, Aug 08 2024 *)

Formula

a(n) = n + A056962(n).

A055966 n + reversal of base 20 digits of n (written in base 10).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, 315, 336, 357, 378, 399, 420, 42, 63, 84, 105, 126, 147, 168, 189, 210, 231, 252, 273, 294, 315, 336, 357, 378, 399, 420
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

If n has an even number of base 20 digits then a(n) is a multiple of 21.

Crossrefs

Cf. A056964.

Formula

a(n) = n + A056963(n).

A247110 n + reversal of digits of n, when n is not palindromic.

Original entry on oeis.org

11, 33, 44, 55, 66, 77, 88, 99, 110, 22, 33, 55, 66, 77, 88, 99, 110, 121, 33, 44, 55, 77, 88, 99, 110, 121, 132, 44, 55, 66, 77, 99, 110, 121, 132, 143, 55, 66, 77, 88, 99, 121, 132, 143, 154, 66, 77, 88, 99, 110, 121, 143, 154, 165, 77, 88, 99, 110, 121, 132, 143, 165, 176, 88, 99, 110, 121, 132, 143, 154, 165, 187, 99, 110, 121
Offset: 10

Views

Author

Morgan L. Owens, Nov 21 2014

Keywords

Crossrefs

Cf. A056964 (n + reversal of digits of n)

Programs

  • Mathematica
    With[{n=50}, (FromDigits[#] + FromDigits[Reverse[#]]) & /@ Select[IntegerDigits[Range[n]], # != Reverse[#] &]]
    Table[If[n==IntegerReverse[n],Nothing,n+IntegerReverse[n]],{n,100}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 29 2016 *)

A285741 a(0) = 1; a(2*n) = a(n), a(2*n+1) = a(n) + R(a(n)), where R() is the digit reversal.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 77, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 77, 4, 8, 8, 16, 8, 16, 16, 77, 8, 16, 16, 77, 16, 77, 77, 154, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 77, 4, 8, 8, 16, 8, 16, 16, 77, 8, 16, 16
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 25 2017

Keywords

Examples

			a(0) = 1;
a(1) = a(2*0+1) = a(0) + R(a(0)) = 1 + 1 = 2;
a(2) = a(2*1) = a(1) = 2;
a(3) = a(2*1+1) = a(1) + R(a(1)) = 2 + 2 = 4;
a(4) = a(2*2) = a(2) = 2;
a(5) = a(2*2+1) = a(2) + R(a(2)) = 2 + 2 = 4, etc.
		

Crossrefs

Cf. A001127 (records), A004086, A056964.

Programs

  • Mathematica
    a[0] = 0; a[n_] := If[EvenQ[n], a[n/2], a[(n - 1)/2] + FromDigits[Reverse[IntegerDigits[a[(n - 1)/2]]]] ]; Table[a[n], {n, 0, 90}]

A345338 Integers whose Reverse And Add trajectory reaches its first prime after a record number of iterations (at least one iteration must be performed).

Original entry on oeis.org

1, 5, 181, 10031, 1001320
Offset: 1

Views

Author

Daniel Starodubtsev, Jun 14 2021

Keywords

Comments

a(6) > 10^9 (if it exists).
All numbers whose trajectory reaches a multiple of 3 or 11 before reaching a prime will never reach a prime.

Examples

			a(3) = 181 because it takes 3 iterations (181 -> 362 -> 625 -> 1151 (prime)) to reach a prime, which is more than any smaller number.
		

Crossrefs

Cf. A056964.

Programs

  • PARI
    f(n) = my(t=n, c=1); while(!isprime(t+=fromdigits(Vecrev(digits(t)))), if(gcd(t, 33)>1, return(0)); c++); c;
    lista(nn) = my(m); for(k=1, nn, if(f(k)>m, print1(k, ", "); m=f(k))); \\ Jinyuan Wang, Jun 15 2021
    
  • Python
    from sympy import isprime
    def ra(n): s = str(n); return int(s) + int(s[::-1])
    def afind(limit):
        record = 0
        for k in range(limit+1):
            m, i = ra(k), 1
            while not isprime(m) and m%3 != 0 and m%11 != 0: m = ra(m); i += 1
            if isprime(m) and i > record: record = i; print(k, end=", ")
    afind(1234567) # Michael S. Branicky, Jul 03 2021

A346141 Numbers k whose number of divisors equals the number of divisors in each of R(k), k+R(k), R(k+R(k)), abs(k-R(k)), and R(abs(k-R(k))), where R(m) is the digit reversal of m and where the reversals of m do not equal m.

Original entry on oeis.org

117858, 129138, 137976, 138222, 194838, 201569, 222831, 281256, 302844, 439415, 448203, 454016, 500638, 514934, 516378, 526486, 533938, 552926, 560766, 562936, 595016, 607499, 607597, 610454, 610595, 629255, 639265, 652182, 654018, 659358, 667065, 679731, 684625, 795706, 810456, 813179
Offset: 1

Views

Author

Scott R. Shannon, Jul 05 2021

Keywords

Comments

There are 324 terms below 50 million. In that range the number of divisors of the terms is 8,12,16,24,32 or 48. The first term with 8 divisors is 129138, the first with 12 is 302844, the first with 16 is 117858, the first with 24 is 138222, the first with 32 is 26739192, and the first with 48 is 19245366.

Examples

			117858 is a term as the number of divisors of 117858 = tau(117858) = 16, and this equals tau(R(117858)) = tau(858711) = 16, tau(117858+R(117858)) = tau(976569) = 16, tau(R(117858+R(117858))) = tau(965679) = 16, tau(abs(117858-R(117858))) = tau(740853) = 16, and tau(R(abs(117858-R(117858)))) = tau(358047) = 16.
		

Crossrefs

Subsequence of A062895.

A351729 a(n) is the least prime that starts a sequence of exactly n primes under the iteration p -> p + reverse(p) + 1.

Original entry on oeis.org

7, 3, 5, 2, 7070879, 700839449, 7700584787999
Offset: 1

Views

Author

Robert Israel, Feb 17 2022

Keywords

Examples

			a(3) = 5 because 5 starts the sequence of 3 primes 5 -> 5+5+1 = 11 -> 11+11+1 = 23, the next iteration 23+32+1 = 56 not being prime.
		

Crossrefs

Programs

  • Maple
    rev:= proc(x) local L,i;
    L:= convert(x,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) option remember;
      local x;
      x:= n + rev(n)+1;
      if isprime(x) then 1+procname(x) else 1 fi
    end proc:
    W:= Array(1..5):
    p:= 1: count:= 0:
    while count < 5 do
      p:= nextprime(p);
      v:= f(p);
      if W[v] = 0 then W[v]:= p; count:= count+1 fi
    od:
    convert(W,list);
  • Mathematica
    With[{s = Array[-1 + Length@ NestWhileList[# + IntegerReverse[#] + 1 &, #, PrimeQ] &, 2^23]}, Array[FirstPosition[s, #][[1]] &, 5]] (* Michael De Vlieger, Feb 17 2022 *)

Extensions

a(6)-a(7) from Martin Ehrenstein, Mar 05 2022
Previous Showing 71-80 of 83 results. Next