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

A385773 Primes having only {1, 2, 5} as digits.

Original entry on oeis.org

2, 5, 11, 151, 211, 251, 521, 1151, 1511, 2111, 2221, 2251, 2521, 2551, 5521, 11251, 11551, 12211, 12251, 12511, 15121, 15511, 15551, 21121, 21211, 21221, 21521, 22111, 22511, 25111, 25121, 51151, 51511, 51521, 51551, 52121, 52511, 55511, 111121, 111211
Offset: 1

Views

Author

Jason Bard, Jul 09 2025

Keywords

Crossrefs

Supersequence of A024050, A020453.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 5]];
    
  • Mathematica
    Flatten[Table[ Select[FromDigits /@ Tuples[{1, 2, 5}, n], PrimeQ], {n, 7}]]
  • PARI
    primes_with(, 1, [1, 2, 5]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("125"), 41))) # uses function/imports in A385776
    

A068916 Smallest positive integer that is equal to the sum of the n-th powers of its prime factors (counted with multiplicity).

Original entry on oeis.org

2, 16, 1096744, 3125, 256, 823543, 19683
Offset: 1

Views

Author

Dean Hickerson, Mar 07 2002

Keywords

Comments

Does a(n) exist for all n?
a(12)=65536, a(27)=4294967296. a(n) exists for all n of the form n=p^i-i, where p is prime and i > 0, since p^p^i is an example (see A067688 and A081177). - Jud McCranie, Mar 16 2003
a(23) <= 298023223876953125. a(24) <= 7625597484987. - Jud McCranie, Jan 18 2016
a(10) = 285311670611. - Jud McCranie, Jan 25 2016
a(24) = 7625597484987. - Jud McCranie, Jan 30 2016

Examples

			a(3) = 1096744 = 2^3*11^3*103; the sum of the cubes of the prime factors is 3*2^3 + 3*11^3 + 103^3 = 1096744.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := For[x=1, True, x++, If[x==Plus@@(#[[2]]#[[1]]^n&/@FactorInteger[x]), Return[x]]]
  • PARI
    isok(k, n) = {my(f=factor(k)); sum(j=1, #f~, f[j,2]*f[j,1]^n) == k;}
    a(n) = {my(k = 1); while(! isok(k,n), k++); k;} \\ Michel Marcus, Jan 25 2016
    
  • Python
    from sympy import factorint
    def a(n):
      k = 1
      while True:
        f = factorint(k)
        if k == sum(f[d]*d**n for d in f): return k
        k += 1
    for n in range(1, 8):
      print(a(n), end=", ") # Michael S. Branicky, Feb 16 2021

A273940 Primes of the form 5^m - m.

Original entry on oeis.org

23, 15619, 244140613
Offset: 1

Views

Author

Vincenzo Librandi, Jun 05 2016

Keywords

Comments

Corresponding values of m are given in A058046.
The next term has 254 digits.

Crossrefs

Primes of the form k^m - m: A081296 (k=2), A224420 (k=3), A224451 (k=4), this sequence (k=5), A273941 (k=6), A224468 (k=7), A224469 (k=8).

Programs

  • Magma
    [a: n in [0..400] | IsPrime(a) where a is 5^n-n];
    
  • Mathematica
    Select[Table[5^n - n, {n, 400}], PrimeQ]
  • PARI
    forstep(n=2,1e4,2, if(ispseudoprime(t=5^n-n), print1(t", "))) \\ Charles R Greathouse IV, Jun 08 2016

Formula

a(n) = A024050(A058046(n)). - Amiram Eldar, Jul 27 2025

A268414 a(n) = 5*a(n-1) - 2*n for n > 0, a(0) = 1.

Original entry on oeis.org

1, 3, 11, 49, 237, 1175, 5863, 29301, 146489, 732427, 3662115, 18310553, 91552741, 457763679, 2288818367, 11444091805, 57220458993, 286102294931, 1430511474619, 7152557373057, 35762786865245, 178813934326183, 894069671630871, 4470348358154309, 22351741790771497, 111758708953857435
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2016

Keywords

Comments

In general, the ordinary generating function for the recurrence relation b(n) = k*b(n - 1) - m*n, with n > 0 and b(0)=1, is (1 - (m + 2)*x + x^2)/((1 - x)^2*(1 - k*x)). This recurrence gives the closed form b(n) = ((k^2 - k*(m + 2) + 1)*k^n + m*((k - 1)*n + k))/(k - 1)^2.

Crossrefs

Programs

  • Magma
    [(4*n + 3*5^n + 5)/8: n in [0..30]]; // Vincenzo Librandi, Feb 06 2016
  • Mathematica
    Table[(4 n + 3 5^n + 5)/8, {n, 0, 23}]
    LinearRecurrence[{7, -11, 5}, {1, 3, 11}, 24]
  • PARI
    Vec((1-4*x+x^2)/((1-x)^2*(1-5*x)) + O(x^100)) \\ Altug Alkan, Feb 04 2016
    

Formula

G.f.: (1 - 4*x + x^2)/((1 - x)^2*(1 - 5*x)).
a(n) = (4*n + 3*5^n + 5)/8.
Sum_{n>=0} 1/a(n) = 1.449934283402232875...
Lim_{n -> oo} a(n + 1)/a(n) = 5.
From Elmo R. Oliveira, Sep 10 2024: (Start)
E.g.f.: exp(x)*(3*exp(4*x) + 4*x + 5)/8.
a(n) = 7*a(n-1) - 11*a(n-2) + 5*a(n-3) for n > 2. (End)

Extensions

a(24)-a(25) from Elmo R. Oliveira, Sep 10 2024
Previous Showing 11-14 of 14 results.