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

A077741 Smallest multiple of n which begins with R(n) and ends in n where R(n) (A004086) is the digit reversal of n. Suitable number of zeros are assumed to the left of the MSD if required.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 2112, 31213, 41314, 5115, 61216, 71417, 8118, 91219, 20, 12621, 22, 32223, 4224, 525, 62426, 72927, 82628, 92829, 30, 130231, 23232, 33, 430134, 53235, 6336, 732637, 83638, 93639, 40, 143541, 241542, 34443, 44, 5445
Offset: 1

Views

Author

Amarnath Murthy, Nov 20 2002

Keywords

Examples

			a(14) = 41314 = 14*2951, a(10) = 10 as it can be written as 010.
		

Crossrefs

Cf. A077742.

Extensions

Corrected and extended by Ray Chandler, Jun 11 2003

A100414 Numbers n such that n is R(n)-th composite number where R(n) is the digit reversal of n (A002808(A004086(n))=n).

Original entry on oeis.org

21, 48034, 69926, 180461, 214591, 409473, 563715, 41630193, 253385633342, 661494322636
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 10 2004

Keywords

Comments

There is no further term < 3*10^9.
a(11) > 3*10^12. [Donovan Johnson, Jun 14 2009]

Examples

			41630193 is in the sequence because 41630193 is the 39103614th composite number.
		

Crossrefs

Programs

  • Mathematica
    Do[s=FromDigits[Reverse[IntegerDigits[n]]];If[s
    				

Extensions

a(9)-a(10) from Donovan Johnson, Jun 14 2009

A100415 Numbers n such that n is R(n)-th nonprime number, where R(n) is the digit reversal of n (A018252(A004086(n))=n).

Original entry on oeis.org

1, 64, 524, 534, 58725, 907538, 6264385, 9438088, 9596598, 27895162, 422984004, 548911025, 8804661048, 49640253574, 63899981216, 95138721219, 97895906839, 469449672154
Offset: 1

Views

Author

Farideh Firoozbakht, Dec 12 2004

Keywords

Comments

n is in the sequence iff n is not prime and R(n)=n-pi(n). There is no further term up to 3670000000.
a(19) > 10^13. Up to that limit, this sequence contains all the numbers k such that R(k) = k - pi(k). - Giovanni Resta, Aug 08 2019

Examples

			548911025 is in the sequence because 548911025 is the 520118945th nonprime natural number.
		

Crossrefs

Programs

  • Mathematica
    Do[s = FromDigits[Reverse[IntegerDigits[n]]]; If[ ! PrimeQ[n] && s == n - PrimePi[n], Print[n]], {n, 548911025}]

Extensions

a(13)-a(18) from Giovanni Resta, Aug 08 2019

A104154 For each natural number n: if the last digit of n is not zero and A004086(n) is prime, append A004086(n) to the sequence.

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 41, 61, 71, 13, 23, 43, 53, 73, 83, 17, 37, 47, 67, 97, 19, 29, 59, 79, 89, 101, 401, 601, 701, 211, 311, 811, 911, 421, 521, 821, 131, 331, 431, 631, 241, 541, 641, 941, 151, 251, 751, 461, 661, 761, 271, 571, 971, 181, 281, 881
Offset: 1

Views

Author

Cino Hilliard, Mar 09 2005

Keywords

Comments

Equivalently, these are the prime numbers ordered by their reversal. - Rémy Sigrist, Feb 13 2022

Examples

			The last digit of 13 is not '0' and 31 is prime, therefore we append 31.
		

Crossrefs

Cf. A004087.

Programs

  • Mathematica
    a = Select[Range[196], IntegerDigits[ # ][[ -1]] != 0 && PrimeQ[FromDigits[Reverse[ IntegerDigits[ # ]]]] &]; b = {}; For[n = 1, n < Length[a] + 1, n++, AppendTo[b, FromDigits[Reverse[IntegerDigits[a[[n]]]]]]]; b
  • PARI
    left(str, n) = { my(v, tmp, x); v =""; tmp = Vec(str); ln=length(tmp); if(n > ln, n=ln); for(x=1, n, v=concat(v, tmp[x]); ); return(v) } \\ Get the left n characters from string str
    rev(str) = { local(tmp, s, j); tmp = Vec(Str(str)); s=""; forstep(j=length(tmp), 1, -1, s=concat(s, tmp[j])); return(s) } \\ Get the reverse of the input string
    rprime(n) = { local(x, y, v); for(x=1, n, y=rev(x); v=Vec(y); if(left(y, 1)<> "0"&&isprime(eval(y)), print1(y", ")) ) }
    
  • Python
    from itertools import count, islice
    from sympy import primerange
    def A104154_gen(): # generator of terms
        yield from (int(d[::-1]) for l in count(1) for d in sorted(str(m)[::-1] for m in primerange(10**(l-1),10**l)))
    A104154_list = list(islice(A104154_gen(),20)) # Chai Wah Wu, Feb 17 2022

Extensions

Edited by Stefan Steinerberger, Aug 01 2007

A151765 a(n) = f(R(n)), where f(n) = A071786(n), R(n) = A004086(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 13, 14, 213, 16, 17, 81, 217, 2, 12, 22, 32, 42, 124, 26, 72, 28, 128, 3, 31, 32, 33, 34, 35, 63, 37, 38, 39, 4, 14, 24, 142, 44, 54, 64, 146, 84, 148, 5, 15, 25, 35, 45, 55, 155, 75, 355, 455, 6, 16, 62, 36, 64, 56, 66, 364, 68, 96, 7, 71, 27
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2009

Keywords

Crossrefs

Programs

A165696 a(n) is the smallest number m such that the n numbers A004086(m^k) (digit reversal of m^k) for 0 < k < n+1 are all primes.

Original entry on oeis.org

2, 14, 325, 3244, 3244, 110218462, 32149366346, 10212002596432
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 29 2009

Keywords

Examples

			Both numbers A004086(14) = 41 and A004086(14^2) = 691 are primes and 14 is the smallest number with this property so a(2) = 14.
		

Crossrefs

Extensions

a(8) from Matthias Baur, Mar 03 2021

A209914 Number of ways n can be written as a multiple of its reversal A004086(n) +/- a prime p < n.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 2, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 2
Offset: 0

Views

Author

M. F. Hasler, Mar 15 2012

Keywords

Comments

If n is not a multiple of 10, then a(n) < 20. The subsequence { a(10k) }, however, is unbounded. In particular, a(10^k)=2*A006880(k).

Examples

			a(10)=8 because R(10)=01=1 and 10 = 3*1 + 7 = 5*1 + 5 = 7*1 + 3 = 8*1 + 2 = 12*1 - 2 = 13*1 - 3 = 15*1 - 5 = 17*1 - 7.
		

Crossrefs

Cf. A209063.

Programs

  • PARI
    a(n)={my(r=A004086(n)); sum(k=1, (2*n-1)\(r+!r), isprime(abs(n-k*r)))}

A237912 Smallest number m (not ending in a 0) such that m and its digit reversal A004086(m) both have n prime factors (counted with multiplicity).

Original entry on oeis.org

13, 15, 117, 126, 1386, 2576, 21708, 25515, 21168, 46848, 295245, 2937856, 6351048, 21989376, 217340928, 2154281472, 2196652032, 21120051456, 21122906112, 40915058688, 274148425728, 2150086519296, 2707602702336, 6167442456576, 21907217055744, 29798871072768, 420127895977984
Offset: 1

Views

Author

Derek Orr, Feb 15 2014

Keywords

Comments

Palindromes are not included in this sequence since the reverse of a palindrome is the same number. See A076886 and A237913.

Examples

			13 and 31 are both prime so a(1) = 13.
15 and 51 have two prime factors (3*5 and 3*17 respectively), so a(2) = 15.
		

Crossrefs

Programs

  • Python
    import sympy
    from sympy import factorint
    def rev(x):
      rev = ''
      for i in str(x):
        rev = i + rev
      return int(rev)
    def RevFact(x):
      n = 1
      while n < 10**8:
        if rev(n) != n:
          if n % 10 != 0:
            if sum(list(factorint(n).values())) == x:
              if sum(list(factorint(rev(n)).values())) == x:
                return n
              else:
                n += 1
            else:
              n += 1
          else:
            n += 1
        else:
          n += 1
    x = 1
    while x < 100:
      print(RevFact(x))
      x += 1

Extensions

a(15)-a(21) from Giovanni Resta, Feb 23 2014
a(22)-a(27) from Max Alekseyev, Feb 07 2024

A248327 Levenshtein distance of n and its reversal in decimal representation, cf. A004086.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 05 2014

Keywords

Comments

a(n) = number of editing steps (replace, delete and insert) to transform n to A004086(n);
a(A002113(n)) = 0, a(10*A002113(n)) = 1 for n > 0;
a(A248336(n)) = n and a(m) != n for m < A248336(n).

Crossrefs

Programs

  • Haskell
    a248327 0 = 0
    a248327 n = levenshtein (show n) (dropWhile (== '0') $ reverse $ show n)
    levenshtein :: (Eq t) => [t] -> [t] -> Int
    levenshtein us vs = last $ foldl transform [0..length us] vs where
       transform xs@(x:xs') c = scanl compute (x+1) (zip3 us xs xs') where
          compute z (c', x, y) = minimum [y+1, z+1, x + fromEnum (c' /= c)]

A269588 Numbers n such that n^2 ends with the digits of n reversed (A004086(n)).

Original entry on oeis.org

1, 5, 6, 963, 9867, 65766, 69714, 6317056, 90899553, 169605719, 4270981082, 96528287587, 465454256742, 692153612536, 182921919071841, 655785969669834, 650700037578750084, 125631041500927357539, 673774165549097456624, 16719041449406813636569
Offset: 1

Views

Author

Keywords

Comments

a(29)>10^32 (if it exists)

Examples

			6317056^2 = 39905196507136 which ends with 6507136, so 6317056 is a term.
		

Crossrefs

Subsequence of A115761.

Programs

  • Mathematica
    Select[Range[10^7], Function[k, Take[IntegerDigits[#^2], -Length@ k] == Reverse@ k]@ IntegerDigits@ # &] (* Michael De Vlieger, Mar 04 2016 *)
  • PARI
    isA269588(n)=dn = digits(n); rn = subst(Polrev(dn), x, 10); nbd = #dn; (n^2 - rn) % 10^nbd == 0; \\ Michel Marcus, Mar 01 2016
    
  • PARI
    \\ printA269588len(d) prints all terms of the sequence with d digits
    rev(n) = eval(concat(Vecrev(Str(n))));
    { printA269588len(d) = my(l, u, n); l=ceil(d/2); u=floor(d/2); for(y=0, 10^l-1, n=rev(y^2 % 10^u)*10^l+y; if(#Str(n)==d && Mod(n, 10^d)^2==rev(n), print(n)); ); }
    \\ Max Alekseyev, Mar 07 2016

Extensions

a(18)-a(20) from Max Alekseyev, Mar 07 2016
a(21)-a(27) from Robert Gerbicz, Apr 03 2016
a(28) from Dieter Beckerle, Jun 09 2016
Previous Showing 51-60 of 587 results. Next