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

A192135 Prime powers p^e with p < e.

Original entry on oeis.org

8, 16, 32, 64, 81, 128, 243, 256, 512, 729, 1024, 2048, 2187, 4096, 6561, 8192, 15625, 16384, 19683, 32768, 59049, 65536, 78125, 131072, 177147, 262144, 390625, 524288, 531441, 1048576, 1594323, 1953125, 2097152, 4194304, 4782969, 5764801, 8388608, 9765625, 14348907
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Crossrefs

Complement to A074583 with respect to A000961.

Programs

  • Maple
    A192135 := proc(nmax) local s ,i,p,e ; s := {} ; for i from 1 do p := ithprime(i) ; if p^(p+1) > nmax then break; end if; for e from p+1 do if p^e > nmax then break; end if; s := s union {p^e} ; end do: end do: sort(s) ; end proc:
    A192135(20000000) ; # R. J. Mathar, Jul 09 2011
  • Mathematica
    seq[lim_] := Module[{s = {}, p = 2}, While[p^p <= lim, AppendTo[s, p^Range[p+1, Log[p, lim]]]; p = NextPrime[p]]; Sort[Flatten[s]]]; seq[10^7] (* Amiram Eldar, Apr 14 2025 *)

Formula

a(n) = A000961(A192187(n)).
A095874(a(n)) = A192187(n).
Sum_{n>=1} 1/a(n) = Sum_{p prime} 1/(p^p*(p-1)) = 0.26859872089648243789... . - Amiram Eldar, Apr 14 2025

A095841 Prime powers having exactly one partition into two prime powers.

Original entry on oeis.org

2, 3, 127, 163, 179, 191, 193, 223, 239, 251, 269, 311, 337, 343, 389, 419, 431, 457, 491, 547, 557, 569, 599, 613, 653, 659, 673, 683, 719, 739, 787, 821, 839, 853, 883, 911, 929, 953, 967, 977, 1117, 1123, 1201, 1229, 1249, 1283, 1289, 1297, 1303, 1327, 1381, 1409, 1423, 1439, 1451, 1471, 1481, 1499, 1607, 1663, 1681
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2004

Keywords

Comments

A095840(A095874(a(n))) = 1.
A071330(a(n)) = 1.

Crossrefs

Intersection of A208247 and A000961.

Programs

  • Haskell
    a095841 n = a095841_list !! (n-1)
    a095841_list = filter ((== 1) . a071330) a000961_list
    -- Reinhard Zumkeller, Jan 11 2013
    
  • Maple
    N:= 10^4: # to get all terms <= N
    primepows:= {1,seq(seq(p^n, n=1..floor(log[p](N))),
        p=select(isprime,[2,seq(2*k+1,k=1..(N-1)/2)]))}:
    npp:= nops(primepows):
    B:= Vector(N,datatype=integer[4]):
    for n from 1 to npp do for m from n to npp do
       j:= primepows[n]+primepows[m];
       if j <= N then B[j]:= B[j]+1 fi;
    od od:
    select(t -> B[t] = 1, primepows); # Robert Israel, Nov 21 2014
  • Mathematica
    max = 2000; ppQ[n_] := n == 1 || PrimePowerQ[n]; pp = Select[Range[max], ppQ]; lp = Length[pp]; Table[pp[[i]] + pp[[j]], {i, 1, lp}, {j, i, lp}] // Flatten // Select[#, ppQ[#] && # <= max&]& // Sort // Split // Select[#, Length[#] == 1&]& // Flatten (* Jean-François Alcover, Mar 04 2019 *)
  • PARI
    is(n)=if(n<127,return(n==2||n==3)); isprimepower(n) && sum(i=2,n\2,isprimepower(i)&&isprimepower(n-i))==1 \\ naive; Charles R Greathouse IV, Nov 21 2014
    
  • PARI
    is(n)=if(!isprimepower(n), return(0)); my(s); forprime(p=2, n\2, if(isprimepower(n-p) && s++>1, return(0))); for(e=2, log(n)\log(2), forprime(p=2, sqrtnint(n\2, e), if(isprimepower(n-p^e) && s++>1, return(0)))); s+(!!isprimepower(n-1))==1 || n==2 \\ faster; Charles R Greathouse IV, Nov 21 2014
    
  • PARI
    has(n)=my(s); forprime(p=2, n\2, if(isprimepower(n-p) && s++>1, return(0))); for(e=2, log(n)\log(2), forprime(p=2, sqrtnint(n\2, e), if(isprimepower(n-p^e) && s++>1, return(0)))); s+(!!isprimepower(n-1))==1
    list(lim)=my(v=List([2])); forprime(p=2,lim,if(has(p), listput(v,p))); for(e=2,log(lim)\log(2), forprime(p=2,lim^(1/e), if(has(p^e), listput(v,p^e)))); Set(v) \\ Charles R Greathouse IV, Nov 21 2014

A095842 Prime powers having no partition into two prime powers.

Original entry on oeis.org

1, 149, 331, 373, 509, 701, 757, 809, 877, 907, 997, 1019, 1087, 1259, 1549, 1597, 1619, 1657, 1759, 1777, 1783, 1867, 1973, 2293, 2377, 2503, 2579, 2683, 2789, 2843, 2879, 2909, 2999, 3119, 3163, 3181, 3187, 3299, 3343, 3433, 3539, 3643
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2004

Keywords

Comments

A095840(A095874(a(n))) = 0.
A071330(a(n)) = 0.
Here, "prime powers" is used in the relaxed sense, including 1. The numbers 96721, 121801, 192721, 205379, 226981,... seem to be the smallest composite terms of this sequence, which establishes the difference with the subsequence A115231. - M. F. Hasler, Nov 20 2014

Crossrefs

Subsequence of A071331.

Programs

  • Haskell
    a095842 n = a095842_list !! (n-1)
    a095842_list = filter ((== 0) . a071330) a000961_list
    -- Reinhard Zumkeller, Jan 11 2013
  • PARI
    isprimepower(n)=ispower(n,,&n);isprime(n)||n==1;
    isA095842(n)=if(!isprimepower(n),return(0));forprime(p=2,n\2,if(isprimepower(n-p),return(0)));forprime(p=2,sqrtint(n\2),for(e=1,log(n\2)\log(p),if(isprimepower(n-p^e),return(0))));!isprimepower(n-1)
    \\ Charles R Greathouse IV, Jul 06 2011
    

A117331 Lexicographically earliest permutation of prime powers such that the exponents of succeeding terms increase at most by 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 8, 11, 13, 17, 19, 23, 25, 27, 16, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 81, 32, 64, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 08 2006

Keywords

Comments

A025474(A095874(a(n+1))) - A025474(A095874(a(n))) <= 1;
A117332(n) = A095874(a(n));
a(A117333(n)) = A000961(n).

Examples

			a(13)..a(16): 23,5^2,3^3,2^4;
a(38)..a(43): 113,11^2,5^3,3^4,2^5,2^6;
a(239)..a(248): 1367,37^2,11^3,5^4,3^5,3^6,2^7,2^8,2^9,2^10.
		

A192188 Positions of prime powers p^e with e <= p within A000961.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Formula

Complement of A192187.
a(n) = A095874(A074583(n)).
A000961(a(n)) = A074583(n).

A322981 If n is the k-th prime power > 1, a(n) = k, otherwise a(n) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 5, 6, 7, 0, 8, 0, 9, 0, 0, 10, 11, 0, 12, 0, 0, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 18, 0, 0, 0, 0, 19, 0, 0, 0, 20, 0, 21, 0, 0, 0, 22, 0, 23, 0, 0, 0, 24, 0, 0, 0, 0, 0, 25, 0, 26, 0, 0, 27, 0, 0, 28, 0, 0, 0, 29, 0, 30, 0, 0, 0, 0, 0, 31, 0, 32, 0, 33, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 35
Offset: 1

Views

Author

Antti Karttunen, Jan 01 2019

Keywords

Comments

This is a ("corrected") variant of A095874, which uses the list of "powers of primes" A000961 instead of prime powers A246655. - M. F. Hasler, Jun 16 2021

Crossrefs

Cf. A000961 (powers of primes, including 1), A010055, A025528, A069513, A095874 (analog based on A000961), A246655 (prime powers > 1).
Cf. A049084.

Programs

  • PARI
    up_to = 16384;
    A322981list(up_to) = { my(v=vector(up_to), k=0); for(n=1,up_to,if(isprimepower(n),k++; v[n] = k, v[n] = 0)); (v); };
    v322981 = A322981list(up_to);
    A322981(n) = v322981[n];
    
  • PARI
    A322981(n)=if(isprimepower(n),sum(i=1,exponent(n),primepi(sqrtnint(n,i)))) \\ M. F. Hasler, Jun 16 2021

Formula

a(n) = A010055(n) * A025528(n) = A069513(n) * A025528(n).
a(n) = A025528(A069513(n)*n), when assuming that A025528(0) = 0.
a(A000961(1+n)) = n for all n >= 1.

A344826 Integers k such that k/A097621(k) is an integer.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60, 891, 1584, 1782, 3564, 4032, 4455, 4752, 7920, 8910, 17820, 20160, 22275, 23760, 44550, 49896, 86400, 89100, 100800, 118800, 249480, 349272, 399168, 694008, 1097712, 1746360, 1778400, 1995840, 2181168, 2774304, 2794176, 3470040
Offset: 1

Views

Author

Michel Marcus, May 29 2021, after a suggestion from Allan C. Wechsler

Keywords

Comments

Allan C. Wechsler remarks that one can derive larger terms from existing terms. For instance, k = 5552064 has q = k/A097621(k) = 18. So multiplying 5552064 by 31 = A000961(18) will give a new term with q = 31.
More precisely, if k = a(n) has q = A343886(k) and m = A000961(q) such that gcd(k, m) = 1, then k*m is also a term. We could call "primitive" those terms not derived from a smaller term in this way. All the listed terms are primitive, but a({35, 36, 38, 42, 43}) allow the sequence to be extended to five larger non-primitive terms. The second and fourth one, having q = 17 resp. q = 23, both lead to a whole chain of many new terms. - M. F. Hasler, Jun 15 2021

Crossrefs

Cf. A000961, A095874, A097621, A127724, A343886 (the ratios k/A097621(k)).

Programs

  • PARI
    f(n) = if(isprimepower(n), sum(i=1, logint(n, 2), primepi(sqrtnint(n, i)))+1, n==1); \\ A095874
    ff(n) = my(fr=factor(n)); for (k=1, #fr~, fr[k,1] = f(fr[k,1]^fr[k,2]); fr[k,2] = 1); factorback(fr); \\ A097621
    isok(k) = denominator(k/ff(k)) == 1;
    
  • PARI
    mappp(nn) = {my(map = Map()); mapput(map, 1, 1); my(nb=1); for (n=2, nn, if (isprimepower(n), nb++; mapput(map, n, nb));); map;}
    ff(n, map) = my(fr=factor(n)); for (k=1, #fr~, fr[k, 1] = mapget(map, fr[k, 1]^fr[k, 2]); fr[k, 2] = 1); factorback(fr); \\ A097621
    wa(na, nb) = {my(map = mappp(nb)); for (k=na, nb, if (denominator(k/ff(k, map)) == 1, print1(k, ", ")););}
    wa(1, 10^8)
    
  • PARI
    is_A344826(n)=!(n%A097621(n))
    extend(n)=n*if(gcd(n, n=A000961(n/A097621(n)))==1,n) \\ Return the larger non-primitive term "derived" from a term n = a(k) with gcd(n,q) = 1, cf. COMMENTS, or zero if gcd(n,q) > 1, i.e., it cannot be "extended" that way. This allows the production of (infinitely?) many new terms from the existing ones. - M. F. Hasler, Jun 15 2021

A192187 Positions of prime powers p^e with p < e within A000961.

Original entry on oeis.org

7, 11, 19, 28, 33, 45, 69, 71, 118, 153, 199, 341, 360, 605, 894, 1079, 1881, 1962, 2294, 3591, 6060, 6636, 7772, 12371, 16229, 23151, 33292, 43580, 44126, 82268, 121021, 146014, 155922, 296348, 334771, 398221, 564689, 650688, 931905, 1078556, 2064590, 2454882
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Formula

Complement of A192188.
A000961(a(n)) = A192135(n).
a(n) = A095874(A192135(n)).

Extensions

a(22)-a(42) from Donovan Johnson, Jul 09 2011

A248906 Binary representation of prime power divisors of n: Sum_{p^k | n} 2^(A065515(p^k)-1).

Original entry on oeis.org

0, 1, 2, 5, 8, 3, 16, 37, 66, 9, 128, 7, 256, 17, 10, 549, 1024, 67, 2048, 13, 18, 129, 4096, 39, 8200, 257, 16450, 21, 32768, 11, 65536, 131621, 130, 1025, 24, 71, 262144, 2049, 258, 45, 524288, 19, 1048576, 133, 74, 4097, 2097152, 551, 4194320, 8201
Offset: 1

Views

Author

Keywords

Examples

			The prime power divisors of 12 are 2, 3, and 4. These are indices 1, 2, and 3 in the list of prime powers, so a(12) = 2^(1-1) + 2^(2-1) + 2^(3-1) = 7.
		

Crossrefs

Programs

  • Haskell
    a248906 = sum . map ((2 ^) . subtract 2 . a095874) . tail . a210208_row
    -- Reinhard Zumkeller, Mar 07 2015
  • PARI
    al(n) = my(r=vector(n),pps=[p| p <- [1..n], isprimepower(p)],p2); for(k=1,#pps,p2=2^(k-1);forstep(j=pps[k],n,pps[k],r[j]+=p2));r
    

Formula

Additive with a(p^k) = Sum_{j=1..k} 2^(A065515(p^j)-1).
a(A051451(k)) = 2^k - 1.
a(n) = Sum_{k=1..A073093(n)} 2^(A095874(A210208(n,k))-2). - Reinhard Zumkeller, Mar 07 2015

A305974 a(1) = 1; for n > 1, if n = p^k for some prime p and exponent k >= 1, then a(n) = -k, otherwise a(n) = 1+A085970(n).

Original entry on oeis.org

1, -1, -1, -2, -1, 2, -1, -3, -2, 3, -1, 4, -1, 5, 6, -4, -1, 7, -1, 8, 9, 10, -1, 11, -2, 12, -3, 13, -1, 14, -1, -5, 15, 16, 17, 18, -1, 19, 20, 21, -1, 22, -1, 23, 24, 25, -1, 26, -2, 27, 28, 29, -1, 30, 31, 32, 33, 34, -1, 35, -1, 36, 37, -6, 38, 39, -1, 40, 41, 42, -1, 43, -1, 44, 45, 46, 47, 48, -1, 49, -4, 50, -1, 51, 52
Offset: 1

Views

Author

Antti Karttunen, Jul 02 2018

Keywords

Crossrefs

Cf. A000961, A065515, A085970, A095874, A305975 (rgs-transform).

Programs

  • PARI
    up_to = 65537;
    partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }
    v065515 = partialsums(n -> (omega(n)<=1), up_to);
    A065515(n) = v065515[n];
    A085970(n) = (n - A065515(n));
    A305974(n) = if(1==n,n,my(e = isprimepower(n)); if(e,-e,1+A085970(n)));

Formula

a(1) = 1; for n > 1, if n = p^k for some prime p and exponent k >= 1, then a(n) = -k, otherwise [when n is not a prime power], a(n) = 1+A085970(n) = running count from 2 onward.
Previous Showing 11-20 of 20 results.