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-5 of 5 results.

A002108 4th powers written backwards.

Original entry on oeis.org

1, 61, 18, 652, 526, 6921, 1042, 6904, 1656, 1, 14641, 63702, 16582, 61483, 52605, 63556, 12538, 679401, 123031, 61, 184491, 652432, 148972, 677133, 526093, 679654, 144135, 656416, 182707, 18, 125329, 6758401, 1295811, 6336331, 5260051, 6169761
Offset: 1

Views

Author

Keywords

Crossrefs

{This sequence} Intersection A000583 = A186080 (palindromes).

Programs

  • Mathematica
    FromDigits[Reverse[IntegerDigits[#]]]&/@(Range[40]^4) (* Harvey P. Dale, May 03 2012 *)
  • PARI
    a(n) = fromdigits(Vecrev(digits(n^4))); \\ Michel Marcus, Jun 04 2019

Formula

From Michel Marcus, Jun 04 2019: (Start)
a(n) = A004086(A000583(n)).
a(n) = A002942(n^2). (End)
a(n * 10^k) = a(n) for k >= 1. - Bernard Schott, Jun 04 2019

A072384 Primes which can be represented as the sum of a cube and its reverse.

Original entry on oeis.org

2, 727, 79697, 85147, 100699, 3946493, 9715169, 10301029, 11592961, 11851481, 13888793, 13913093, 17746387, 125000521, 176232571, 358030753, 417302813, 433748423, 726463627, 810090007, 817807817, 832595227, 854121557, 875444677
Offset: 1

Views

Author

Shyam Sunder Gupta, Jul 20 2002

Keywords

Examples

			727 is a term because it is prime and it is the sum of cube 512 and its reverse 215.
		

Crossrefs

Programs

  • Mathematica
    Select[#+IntegerReverse[#]&/@(Range[1000]^3),PrimeQ]//Union (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 21 2016 *)
  • Python
    from sympy import isprime
    def rev(n): return int(str(n)[::-1])
    def aupto(lim):
        c = [p**3 for p in range(1, int(lim**(1/3))+2)]
        s = set(ara for ara in (a + rev(a) for a in c) if ara <= lim)
        return sorted(filter(isprime, s))
    print(aupto(10**9)) # Michael S. Branicky, Jun 26 2021

A319603 a(n) = n^3 + reversal of digits of n^3.

Original entry on oeis.org

0, 2, 16, 99, 110, 646, 828, 686, 727, 1656, 1001, 2662, 9999, 10109, 7216, 9108, 11000, 8107, 8217, 16445, 8008, 10890, 95249, 88288, 56655, 68276, 85147, 58374, 47864, 122731, 27072, 49583, 119491, 109890, 79697, 100699, 112320, 86258, 82717, 150714, 64046, 81907, 162135, 150104
Offset: 0

Views

Author

Seiichi Manyama, Sep 24 2018

Keywords

Crossrefs

n^b + reversal of digits of n^b: A056964 (b=1), A061226 (b=2), this sequence (b=3).
Cf. A000578, A004165, A072384 (subsequence of primes).

Programs

  • PARI
    {a(n) = n^3+fromdigits(Vecrev(digits(n^3)))}

Formula

a(n) = A000578(n) + A004165(n).

A062018 a(n) = n^n written backwards.

Original entry on oeis.org

1, 4, 72, 652, 5213, 65664, 345328, 61277761, 984024783, 1, 116076113582, 6528440016198, 352295601578203, 61085552860021111, 573958083098398734, 61615590737044764481, 771467633688162042728, 42457573569257080464393
Offset: 1

Views

Author

Amarnath Murthy, Jun 01 2001

Keywords

Examples

			a(5) = 5213, as 5^5 = 3125.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 50 do a := convert(n^n,base,10):b := add(10^(nops(a)- i)*a[i],i=1..nops(a)):printf(`%d,`,b); od:
  • Mathematica
    Table[IntegerReverse[n^n],{n,20}] (* Harvey P. Dale, Jul 31 2022 *)
  • PARI
    a(n) = { fromdigits(Vecrev(digits( n^n )))} \\ Harry J. Smith, Jul 29 2009

Formula

a(n) = A004086(n^n).

Extensions

More terms from Jason Earls and Vladeta Jovovic, Jun 01 2001

A161354 Cubes whose reversal is a prime number.

Original entry on oeis.org

125, 125000, 140608, 704969, 1643032, 1815848, 3511808, 3723875, 3869893, 7301384, 9393931, 10360232, 11543176, 14526784, 15069223, 15252992, 15813251, 16777216, 19902511, 34328125, 34645976, 35287552, 70444997, 92345408
Offset: 1

Views

Author

Claudio Meller, Jun 07 2009

Keywords

Examples

			1815848 is a term because it is a cube and 8485181 is a prime.
		

Crossrefs

Programs

  • Maple
    rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: a := proc (n) if isprime(rev(n^3)) = true then n^3 else end if end proc: seq(a(n), n = 1 .. 460); # Emeric Deutsch, Jun 27 2009
  • Mathematica
    Select[Range[500]^3,PrimeQ[IntegerReverse[#]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 03 2019 *)
  • PARI
    lista(nn) = { for(n=1, nn, if(ispseudoprime(eval(concat(Vecrev(Str(n^3))))), print1(n^3, ", ")); ); } \\ Altug Alkan, Dec 20 2015
  • Python
    from sympy import isprime
    A161354_list, i, j = [], 0, 0
    while j < 10**15:
        p = int(str(j)[::-1])
        if isprime(p):
            A161354_list.append(j)
        j += 3*i*(i+1)+1
        i += 1
    A161354_list = sorted(A161354_list) # Chai Wah Wu, Dec 20 2015
    
Showing 1-5 of 5 results.