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 21-30 of 214 results. Next

A226230 Nontrivial prime powers (A025475) which are a sum of a smaller nontrivial prime power and a perfect square.

Original entry on oeis.org

8, 9, 25, 32, 81, 125, 128, 169, 289, 343, 512, 625, 1681, 2048, 2197, 3125, 3721, 4913, 8192, 32761, 32768, 50653, 66049, 78125, 97969, 131072, 177241, 357911, 524288, 707281, 1030301, 1419857, 1442401, 1953125, 2097152, 2476099, 3031081, 3463321, 6355441, 7645373
Offset: 1

Views

Author

Alex Ratushnyak, May 31 2013

Keywords

Examples

			81 = 32 + 7^2, so 81 is in the sequence.
169 = 25 + 12^2, so 169 is in the sequence.
		

Crossrefs

Programs

  • C
    #include 
    #include 
    #include 
    #define TOP (1ULL<<32)
    typedef unsigned long long U64;
    int compare64(const void *p1, const void *p2) {
      if (*(U64*)p1== *(U64*)p2) return 0;
      return (*(U64*)p1 < *(U64*)p2) ? -1 : 1;
    }
    int main() {
      U64 i, j, p, t, r, n=0, *pp = (U64*)malloc(TOP/2);
      unsigned char *c = (unsigned char *)malloc(TOP/8);
      memset(c, 0, TOP/8);
      for (pp[n++] = i = 1; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1) & 7)))==0) {
          for (p=i+(i==1), j = p*p; ; j*=p) {
            pp[n++] = j;
            double k = ((double)j) * ((double)p);
            if (k >= ((double)(1ULL<<62)*4.0)) break;
          }
          if(i>1) for (j=i*i>>1; j>3]|= 1<<(j&7);
        }
      qsort(pp, n, 8, compare64);
      for (i = 0; i < n; i++)
        for (p=pp[i], j=0; j < i; j++) {
          t = p - pp[j];
          r = sqrt(t);
          if (r*r==t) { printf("%llu, ", p); break; }
        }
      return 0;
    }
  • Maple
    for n from 1 do
        if isA025475(n) then
            for j from 1 do
                pj := n-j^2 ;
                if pj < 0 then
                    break;
                elif isA025475(pj) then
                    printf("%d,\n",n);
                    break ;
                end if;
            end do:
        end if:
    end do: # R. J. Mathar, Jun 06 2013

A226231 Nontrivial prime powers (A025475) which are a sum of a smaller nontrivial prime power and a perfect square in more than 1 way.

Original entry on oeis.org

25, 125, 512, 3125, 4913, 50653, 78125, 7645373, 48828125, 69343957, 310288733, 410338673, 1220703125, 4103684801, 24820429213, 164296466333, 296709280757, 762939453125, 1772000266301, 10368641602001, 11392143817501, 19073486328125, 29724740184833, 72079590632113
Offset: 1

Views

Author

Alex Ratushnyak, May 31 2013

Keywords

Comments

Subsequence of A226230.

Examples

			125 = 4 + 11^2 = 25 + 10^2 = 121 + 4^2. Because there are three representations, 125 is in the sequence. Note that 100 + 5^2 is not listed, because 100 is not a prime power.
		

Crossrefs

Programs

  • C
    #include 
    #include 
    #include 
    #define TOP (1ULL<<32)
    typedef unsigned long long U64;
    int compare64(const void *p1, const void *p2) {
      if (*(U64*)p1== *(U64*)p2) return 0;
      return (*(U64*)p1 < *(U64*)p2) ? -1 : 1;
    }
    int main() {
      U64 i, j, k, p, t, r, n=0, *pp = (U64*)malloc(TOP/2);
      unsigned char *c = (unsigned char *)malloc(TOP/8);
      memset(c, 0, TOP/8);
      for (pp[n++] = i = 1; i < TOP; i+=2)
        if ((c[i>>4] & (1<<((i>>1) & 7)))==0) {
          for (p=i+(i==1), j = p*p; ; j*=p) {
            pp[n++] = j;
            double k = ((double)j) * ((double)p);
            if (k >= ((double)(1ULL<<62)*4.0)) break;
          }
          if(i>1) for (j=i*i>>1; j>3]|= 1<<(j&7);
        }
      qsort(pp, n, 8, compare64);
      for (i = 0; i < n; i++)
        for (p=pp[i], j = k = 0; j < i; j++) {
          t = p - pp[j];
          r = sqrt(t);
          if (r*r==t && ++k==2) { printf("%llu, ", p); break; }
        }
      return 0;
    }

A226232 Nontrivial prime powers (A025475) which are a sum of a smaller nontrivial prime power and a perfect cube.

Original entry on oeis.org

9, 16, 128, 243, 512, 841, 1024, 1849, 5041, 6561, 8192, 32041, 65536, 76729, 157609, 177147, 187489, 310249, 524288, 734449, 1104601, 4108729, 4194304, 4782969, 5067001, 7778521, 11498881, 12823561, 31956409, 33554432, 38651089, 65302561, 78552769, 90459121, 129140163
Offset: 1

Views

Author

Alex Ratushnyak, May 31 2013

Keywords

Crossrefs

Programs

  • Maple
    for n from 1 do
        if isA025475(n) then
            for j from 1 do
                pj := n-j^3 ;
                if pj < 0 then
                    break;
                elif isA025475(pj) then
                    printf("%d,\n",n);
                    break ;
                end if;
            end do:
        end if:
    end do: # R. J. Mathar, Jun 06 2013

A239522 Prime powers (A025475) such that the distance to the nearest prime power is a prime.

Original entry on oeis.org

1, 4, 16, 25, 27, 32, 81, 125, 128, 169, 243, 256, 512, 529, 2048, 7921, 8192, 32761, 32768, 130321, 131072, 134689, 524288, 2093809, 2097152, 8388608, 8392609, 134217728, 134258569, 536870912, 536987929, 8590138489, 140737625897521, 562949953421312, 562950076511761
Offset: 1

Views

Author

Alex Ratushnyak, Mar 20 2014

Keywords

Crossrefs

A385380 Partial products of the sequence nonprime powers of primes (A025475).

Original entry on oeis.org

1, 4, 32, 288, 4608, 115200, 3110400, 99532800, 4877107200, 312134860800, 25282923724800, 3059233770700800, 382404221337600000, 48947740331212800000, 8272168115974963200000, 2010136852181916057600000, 514595034158570510745600000, 148717964871826877605478400000
Offset: 1

Views

Author

Amiram Eldar, Jun 27 2025

Keywords

Comments

Indices of records in A385379.
a(n) is the least index k such that A385379(k) = n-1.

Crossrefs

Subsequence of A001694 and A025487 (i.e., of A181800).

Programs

  • Mathematica
    FoldList[Times, 1, Select[Range[250], !PrimeQ[#] && PrimePowerQ[#] &]] (* Amiram Eldar, Jun 27 2025 *)
  • PARI
    list(lim) = {my(p = 1); print1(p, ", "); for(k = 2, lim, if(isprimepower(k) > 1, p *= k; print1(p, ", ")));}

Formula

a(n) = Product_{k=1..n} A025475(k).

A060848 Difference between a nontrivial prime power (A025475) and the next prime.

Original entry on oeis.org

1, 3, 2, 1, 4, 2, 5, 4, 3, 2, 6, 2, 3, 4, 8, 1, 4, 4, 6, 9, 12, 6, 4, 12, 6, 7, 30, 4, 12, 12, 5, 16, 6, 4, 10, 10, 12, 10, 6, 3, 4, 6, 10, 4, 6, 2, 4, 10, 6, 17, 4, 10, 4, 18, 6, 30, 12, 12, 4, 10, 27, 4, 6, 4, 12, 4, 28, 6, 2, 10, 4, 4, 10, 12, 18, 10, 10, 3, 12, 4, 12, 6, 10, 10, 18, 10, 12
Offset: 1

Views

Author

Labos Elemer, May 03 2001

Keywords

Comments

a(n)=1 only for some powers of 2 corresponding to Fermat primes > 3. - Edited by Robert Israel, Jun 03 2021

Examples

			78125=5^7 is followed by 78137, the difference is 12.
		

Crossrefs

Programs

  • Maple
    N:= 10^5: # for prime powers <= N
    S:= {}:
    p:= 1:
    do
      p:= nextprime(p);
      if p^2 > N then break fi;
      S:= S union {seq(p^i,i=2..floor(log[p](N)))}
    od:
    map(t -> nextprime(t)-t, sort(convert(S,list))); # Robert Israel, Jun 03 2021
  • Mathematica
    NextPrime[#]-#&/@Select[Range[100000],PrimePowerQ[#]&&!PrimeQ[#]&] (* Harvey P. Dale, Oct 19 2022 *)

Formula

a(n) = nextprime(A025475(n)) - A025475(n) = A013632(A025475(n)).

A065523 Numbers n such that sigma(n) is a prime power (A025475).

Original entry on oeis.org

3, 7, 21, 31, 81, 93, 127, 217, 381, 400, 651, 889, 2667, 3937, 8191, 11811, 24573, 27559, 57337, 82677, 131071, 172011, 253921, 393213, 524287, 761763, 917497, 1040257, 1572861, 1777447, 2752491, 3120771, 3670009, 4063201, 5332341
Offset: 1

Views

Author

Robert G. Wilson v, Nov 27 2001

Keywords

Crossrefs

A proper subset of A065496.

Programs

  • Mathematica
    s[n_] := DivisorSigma[1, n ]; Select[ Range[2, 10^6], !PrimeQ[ s[ # ]] && Mod[ s[ # ], s[ # ] - EulerPhi[ s[ # ]]] == 0 & ]

Extensions

a(31)-a(35) from Donovan Johnson, Sep 05 2008

A065743 Smallest number with exactly A025475(n) divisors.

Original entry on oeis.org

1, 6, 24, 36, 120, 1296, 900, 840, 46656, 7560, 44100, 60466176, 810000, 83160, 2176782336, 2822400, 1081080, 2821109907456, 729000000, 101559956668416, 17297280, 131621703842267136, 1944810000, 341510400
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Comments

Note that 2^(n-1) has n divisors. - David Wasserman, Sep 09 2002

Crossrefs

Programs

  • Mathematica
    a = Table[ 0, {1024} ]; Do[ b = DivisorSigma[ 0, n]; If[ b < 1025 && a[[b]] == 0, a[[b]] = n], {n, 1, 10^8/2} ]; a[[ Select[ Range[2, 1024], !PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ]] == 0 & ] ]]

Formula

a(n) = A005179(A025475(n)).

Extensions

More terms from David Wasserman, Sep 09 2002

A076047 Primes which are the difference between two successive nontrivial prime powers (A025475).

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 41, 139, 151, 199, 271, 307, 751, 1217, 3343, 3617, 4001, 4241, 40841, 97169, 117017, 203897, 746153, 123090449, 137542193, 256534591, 21249911167, 88109383889, 112332648583, 85726065193313, 226411321073393
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, Oct 29 2002

Keywords

Comments

I have searched through prime powers up to 2^8532. It is very unlikely that there are any other values between the ones listed here, but no prime has been proved to be absent from this sequence. - David Wasserman, Mar 31 2005

Examples

			3 = 128 - 125 = 2^7 - 5^3; 7 = 16 - 9 = 32768 - 32761; 17 = 49 - 32 = 81 - 64 = 529 - 512; 4241 = 528529 - 524288 = 727^2 - 2^19.
		

Crossrefs

Programs

  • Mathematica
    pp = Sort[ Flatten[ Table[ Prime[n]^i, {n, 1, PrimePi[ Sqrt[10^16]]}, {i, 1, Log[ Prime[n], 10^16]}]]]; l = Length[pp]; d = Sort[Take[pp, -l + 1] - Take[pp, l - 1]]; a = {}; Do[ If[ PrimeQ[ d[[n]]], a = Append[a, d[[n]]]], {n, 1, l - 1}]; Union[a] a = {}; Do[ If[ PrimeQ[ pp[[n + 1]] - pp[[n]]], a = Append[a, pp[[n + 1]] - pp[[n]]]], {n, 1, Length[pp] - 1}]; Union[a]

Extensions

More terms from David Wasserman, Mar 31 2005

A225388 Prime powers (A025475) representable as (p+q)/2, where p and q are distinct prime powers.

Original entry on oeis.org

25, 125, 169, 243, 256, 289, 625, 841, 1369, 1681, 2809, 3125, 3721, 5329, 9409, 11881, 12769, 18769, 22201, 28561, 37249, 38809, 54289, 76729, 83521, 100489, 113569, 151321, 160801, 196249, 201601, 208849, 292681, 323761, 375769, 390625, 410881, 426409, 452929, 502681
Offset: 1

Views

Author

Alex Ratushnyak, May 05 2013

Keywords

Examples

			a(1) = 25 = (1 + 49) / 2.
a(2) = 125 = (81 + 169) / 2.
a(3) = 169 = (49 + 289) / 2.
a(4) = 243 = (125 + 361) / 2.
a(5) = 256 = (169 + 343) / 2.
a(6) = 289 = (49 + 529) / 2.
		

Crossrefs

Previous Showing 21-30 of 214 results. Next