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

A057895 Nonnegative numbers which can be written as m^k-m [with m and k nonnegative and 0^0 taken as 1].

Original entry on oeis.org

0, 1, 2, 6, 12, 14, 20, 24, 30, 42, 56, 60, 62, 72, 78, 90, 110, 120, 126, 132, 156, 182, 210, 240, 252, 254, 272, 306, 336, 342, 380, 420, 462, 504, 506, 510, 552, 600, 620, 650, 702, 720, 726, 756, 812, 870, 930, 990, 992, 1020, 1022, 1056, 1122, 1190, 1260
Offset: 0

Views

Author

Henry Bottomley, Sep 26 2000

Keywords

Examples

			a(8)=30 is in the sequence since 30=2^6-2 (and also =6^2-6).
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all entries up to N
    S:= {0,1}:
    for m from 2 to floor((1+sqrt(1+4*N))/2) do
         S:= S union {seq(m^k - m,k=2 .. floor(log(N+m)/log(m)))}
    end do:
    S; # Robert Israel, Feb 12 2013

A057896 Nonnegative numbers that can be written as m^k - m (with m and k nonnegative) in more than one way.

Original entry on oeis.org

0, 6, 30, 210, 240, 2184, 8190, 78120, 24299970
Offset: 1

Views

Author

Henry Bottomley, Sep 26 2000

Keywords

Comments

The next term, if it exists, is at least 2*10^17. - David Wasserman, May 01 2002
a(10) > 10^24, if it exists. The only numbers below 10^24 that can be written as m^k+m in more than one way are 30 = 5^2+5 = 3^3+3 and 130 = 5^3+5 = 2^7+2. - Giovanni Resta, Jun 21 2018
Conjectured to be finite and complete by Bennett (2001).

Examples

			30 is in the sequence since 30 = 2^5 - 2 = 6^2 - 6;
2184 is in the sequence since 2184 = 3^7 - 3 = 13^3 - 13.
		

Crossrefs

Programs

  • Maple
    res:= {0}:
    for k from 3 to 60 do
      for m from 2 while m^k-m < 2^60 do
         x:= m^k-m;
         if assigned(R[x]) or issqr(4*x+1) then res:= res union {x}
         else R[x]:= [m,k]
         fi
      od
    od:
    res; # Robert Israel, Oct 07 2015

Extensions

More terms from Jud McCranie, Oct 01 2000
Offset corrected by Joerg Arndt, Oct 07 2015

A308394 Numbers which can be written in the form m^k - m with m prime and k a positive integer.

Original entry on oeis.org

0, 2, 6, 14, 20, 24, 30, 42, 62, 78, 110, 120, 126, 156, 240, 254, 272, 336, 342, 506, 510, 620, 726, 812, 930, 1022, 1320, 1332, 1640, 1806, 2046, 2162, 2184, 2394, 2756, 3120, 3422, 3660, 4094, 4422, 4896, 4970, 5256, 6162, 6558, 6806, 6840, 7832, 8190, 9312
Offset: 1

Views

Author

Craig J. Beisel, May 24 2019

Keywords

Comments

The only known terms which have two representations where m is prime are 6 and 2184. It is conjectured by Bennett these are the only terms with this property.

Examples

			a(9) = 2^6 - 2 = 62.
For the two terms known to have two representations we have a(3) = 6 = 2^3 - 2 = 3^2 - 3 and a(33)= 2184 = 3^7 - 3 = 13^3 - 13.
		

Crossrefs

Subsequences: A000918 (2^n - 2), A036689 (p^2 - p), A058809 (3^n - 3), A178671 (5^n - 5).

Programs

  • Maple
    N:= 10^6; # to get all terms <= N
    P:= select(isprime,[2,seq(i,i=3..floor((1+sqrt(1+4*N))/2),2)]):
    S:= {0,seq(seq(m^k-m,k=2..floor(log[m](N+m))),m=P)}:
    sort(convert(S,list)); # Robert Israel, Aug 11 2019
  • PARI
    x=List([]); lim=10000; forprime(m=2, lim, for(k=1, 100, y=(m^k-m); if(y>lim, break, i=setsearch(x, y, 1); if(i>0, listinsert(x, y, i))))); for(i=1, #x, print(x[i]));
    
  • PARI
    isok(n) = {forprime(p=2, oo, my(keepk = 0); for (k=1, oo, if ((x=p^k - p) == n, return(1)); if (x > n, keepk = k; break);); if (keepk == 2, break););} \\ Michel Marcus, Aug 06 2019
Showing 1-3 of 3 results.