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 49 results. Next

A319151 Heinz numbers of superperiodic integer partitions.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 12 2018

Keywords

Comments

First differs from A061345 at a(1) = 2 and next at a(98) = 441.
A number n is in the sequence iff n = 2 or the prime indices of n have a common divisor > 1 and the Heinz number of the multiset of prime multiplicities of n, namely A181819(n), is already in the sequence.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			The sequence of partitions whose Heinz numbers belong to the sequence begins: (1), (2), (3), (4), (2,2), (5), (6), (7), (8), (9), (3,3), (2,2,2), (10), (11), (12), (13), (14), (15), (4,4), (16), (17), (18), (19), (20), (21), (22), (2,2,2,2).
		

Crossrefs

Programs

  • Mathematica
    supperQ[n_]:=Or[n==2,And[GCD@@PrimePi/@FactorInteger[n][[All,1]]>1,supperQ[Times@@Prime/@FactorInteger[n][[All,2]]]]];
    Select[Range[500],supperQ]

A247837 Primes p of the form sigma(2k-1) for a number k.

Original entry on oeis.org

13, 31, 307, 1093, 1723, 2801, 3541, 5113, 8011, 10303, 17293, 19531, 28057, 30103, 30941, 86143, 88741, 147073, 292561, 459007, 492103, 552793, 579883, 598303, 684757, 704761, 732541, 735307, 797161, 830833, 1191373, 1204507, 1353733, 1395943, 1424443, 1482307
Offset: 1

Views

Author

Jaroslav Krizek, Sep 24 2014

Keywords

Comments

Supersequence of A247836.
The multiplicity of the sigma-function means that the 2k-1 are odd prime powers 3^2, 5^2, 17^2, 3^6, 41^2,... (A061345), and the fact that sigma(k)>=k means that a numerical search for any candidate p can be limited to the prime powers less than p. - R. J. Mathar, Jun 04 2016

Examples

			Prime 13 is in sequence because there is number 5 such that sigma(2*5-1) = sigma(9) = 13.
		

Crossrefs

Programs

  • Magma
    Sort(b) where b is [a: n in [1..2500000] | IsPrime(a) where a is SumOfDivisors(2*n-1)];
    
  • Maple
    isA247837 := proc(n)
        local i,opp;
        if isprime(n) then
            for i from 1 do
                opp := A061345(i) ;
                if numtheory[sigma](opp) = n then
                    return true;
                elif opp > n then
                    return false;
                end if;
            end do:
        else
            false;
        end if;
    end proc:
    for n from 2 do
        p := ithprime(n) ;
        if isA247837(p) then
            printf("%d,\n",p) ;
        end if;
    end do: # R. J. Mathar, Jun 04 2016
  • PARI
    for(n=1,10^7,if(isprime(sigma(2*n-1)),print1(sigma(2*n-1),", "))) \\ Derek Orr, Sep 25 2014. ***WARNING: This program prints the terms not in correct order. - M. F. Hasler, Nov 16 2014

Formula

a(n) = sigma(2*A247820(n)-1) = A000203(2*A247820(n)-1). ***WARNING: This formula is not correct for all n. - M. F. Hasler, Nov 16 2014
The first discrepancy in the above formula is at n=11, where a(11) = A000203(2*A247820(12)-1) while A000203(2*A247820(11)-1)=a(12). - Robert Israel, Mar 31 2020

Extensions

Corrected and edited by Jaroslav Krizek, Nov 14 2014

A115231 Primes p which cannot be written in the form 2^i + q^j where i >= 0, j >= 1, q = odd prime.

Original entry on oeis.org

2, 3, 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, 3697, 3739, 3779
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 17 2006

Keywords

Comments

Union with A115232 gives all primes (A000040).
All terms > 3 are in A095842. - M. F. Hasler, Nov 20 2014

Examples

			A000040(35) = 149 = 2^7+3*7 = 2^6+5*17 = 2^5+3*3*13 =
2^4+7*19 = 2^3+3*47 = 2^2+5*29 = 2^1+3*7*7 = 2^0+2*2*37, therefore 149 is a term (A115230(35)=0).
		

Crossrefs

Programs

  • Mathematica
    maxp = 3779; Complement[pp = Prime[Range[PrimePi[maxp]]], Union[Sort[Reap[Do[p = 2^i + q^j; If[p <= maxp && PrimeQ[p], Sow[p]], {i, 0, Log[2, maxp]//Ceiling}, {j, 1, Log[3, maxp]//Ceiling}, {q, Rest[pp]} ]][[2, 1]]]]] (* Jean-François Alcover, Aug 03 2018 *)
  • PARI
    upto(n) = {my(pr = primes(primepi(n)), found = List(), s); for(i = 0, logint(n, 2), s = 2^i; forprime(q = 3, n - 2^i, for(j = 1, logint(n - 2^i, q),
    listput(found, s + q^j)))); listsort(found, 1); setminus(Set(pr), Set(found))} \\ David A. Corneth, Aug 03 2018

Extensions

Recomputed (based on recomputation of A115230) by R. J. Mathar and Reinhard Zumkeller, Apr 29 2010.
Edited by N. J. A. Sloane, Apr 30 2010
2, 3 inserted by David A. Corneth, Aug 03 2018

A244623 Odd prime powers that are not primes.

Original entry on oeis.org

1, 9, 25, 27, 49, 81, 121, 125, 169, 243, 289, 343, 361, 529, 625, 729, 841, 961, 1331, 1369, 1681, 1849, 2187, 2197, 2209, 2401, 2809, 3125, 3481, 3721, 4489, 4913, 5041, 5329, 6241, 6561, 6859, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12167, 12769, 14641, 15625, 16129, 16807, 17161, 18769, 19321, 19683
Offset: 1

Views

Author

Jani Melik, Jul 02 2014

Keywords

Comments

Intersection of A061345 and A014076.
A014076 set minus A061346.

Crossrefs

Intersection of A005408 and A025475.
Cf. A061345 (odd prime powers), A061346 (odd neither prime nor prime power), A062739 (odd powerful), A075109 (perfect powers), A136141.

Programs

  • Mathematica
    Join[{1},Select[Range[1,20001,2],PrimePowerQ[#]&&(!PrimeQ[#])&]] (* Harvey P. Dale, Dec 11 2018 *)
  • PARI
    isok(p) = ((p%2) && !isprime(p) && isprimepower(p)) || (p==1); \\ Michel Marcus, Jul 06 2021
  • Sage
    def isA244623(n) :
       return(n % 2 == 1 and is_prime_power(n) == 1 and is_prime(n) == 0)
    [n for n in (1..20000) if isA244623(n)]
    

Formula

a(n) = A079290(n) at least in the range n=3..94, and perhaps beyond. - R. J. Mathar, Aug 20 2014
Sum_{n>=1} 1/a(n) = 1/2 + Sum_{p prime} 1/(p*(p-1)) = 1/2 + A136141. - Amiram Eldar, Dec 21 2020

A115230 Let p = prime(n); a(n) = number of ways to write p = 2^i + q^j where i >= 0, j >= 1, q = odd prime.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 2, 2, 2, 3, 2, 2, 3, 2, 4, 3, 2, 2, 2, 2, 2, 4, 1, 3, 3, 4, 0, 2, 3, 1, 3, 3, 1, 4, 1, 1, 2, 4, 2, 1, 3, 3, 2, 1, 3, 1, 3, 2, 1, 3, 2, 2, 3, 4, 2, 1, 2, 2, 0, 1, 3, 2, 4, 2, 2, 0, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 3, 0, 2, 3, 2, 1, 1, 3, 1, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 17 2006

Keywords

Examples

			n=25: A000040(25) = 97 = 2^6 + 3*11 = 2^5 + 5*13 = 2^4 + 3^4 = 2^3 + 89^1 = 2^2 + 3*31 = 2^1 + 5*19 = 2^0 + 3*2^5, therefore a(25) = #{[16+81], [8+89]} = 2.
		

Crossrefs

Programs

  • Maple
    From Reinhard Zumkeller, Apr 30 2010: (Start)
    A000035 := proc(n) n mod 2 ; end proc:
    A000108 := proc(n) binomial(2*n,n)/(n+1) ; end proc:
    A036987 := proc(n) A000108(n) mod 2 ; end proc:
    A010055 := proc(n) if n = 1 then 1; else numtheory[factorset](n) ; if nops(%) = 1 then 1; else 0; end if; end if: end proc:
    A115230 := proc(n) p := ithprime(n) ; add(A036987(k-1)*A000035(p-k)*A010055(p-k), k=1..p-1) ; end proc: seq(A115230(n),n=1..40) ; # R. J. Mathar, Apr 30 2010 (End)
  • Mathematica
    f[p_] := Length@ Table[q = p - 2^exp; If[ PrimeNu@ q == 1, {q}, Sequence @@ {}], {exp, 0, Floor@ Log2@ p}]; Table[ f[ Prime[ n]], {n, 105}] (* Robert G. Wilson v, Oct 05 2014 *)

Formula

a(n) = Sum_{k=1..prime(n)-1} A036987(k-1)*A000035(p-k)*A010055(p-k). - Reinhard Zumkeller, Apr 29 2010

Extensions

Recomputed by Charles R Greathouse IV, Ray Chandler, R. J. Mathar, and Reinhard Zumkeller, Apr 29 2010; thanks to Charles R Greathouse IV, who pointed out that there were many errors in entries of A115230-A115233.
Edited by N. J. A. Sloane, Apr 30 2010
Formula corrected (thanks to R. J. Mathar, who found an error in it) by Reinhard Zumkeller, Apr 30 2010

A377702 Perfect-powers except for powers of 2.

Original entry on oeis.org

9, 25, 27, 36, 49, 81, 100, 121, 125, 144, 169, 196, 216, 225, 243, 289, 324, 343, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849, 1936, 2025, 2116, 2187, 2197
Offset: 1

Views

Author

Gus Wiseman, Nov 05 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.

Examples

			The terms together with their prime indices begin:
     9: {2,2}
    25: {3,3}
    27: {2,2,2}
    36: {1,1,2,2}
    49: {4,4}
    81: {2,2,2,2}
   100: {1,1,3,3}
   121: {5,5}
   125: {3,3,3}
   144: {1,1,1,1,2,2}
   169: {6,6}
   196: {1,1,4,4}
   216: {1,1,1,2,2,2}
   225: {2,2,3,3}
   243: {2,2,2,2,2}
   289: {7,7}
   324: {1,1,2,2,2,2}
		

Crossrefs

Including the powers of 2 gives A001597, counted by A377435.
For prime-powers we have A061345.
These terms are counted by A377467, for non-perfect-powers A377701.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A188951 counts perfect-powers less than 2^n.
A377468 gives the least perfect-power > n.

Programs

  • Mathematica
    Select[Range[1000],GCD@@FactorInteger[#][[All,2]]>1&&!IntegerQ[Log[2,#]]&]
  • Python
    from sympy import mobius, integer_nthroot
    def A377702(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-2+x+(l:=x.bit_length())+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,l)))
        return bisection(f,n+1,n+1) # Chai Wah Wu, Nov 06 2024

A132952 a(n) is the number of isolated totatives of n.

Original entry on oeis.org

0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 6, 2, 8, 0, 6, 0, 8, 2, 10, 0, 8, 0, 12, 0, 12, 0, 8, 0, 16, 2, 16, 2, 12, 0, 18, 2, 16, 0, 12, 0, 20, 6, 22, 0, 16, 0, 20, 2, 24, 0, 18, 2, 24, 2, 28, 0, 16, 0, 30, 6, 32, 2, 20, 0, 32, 2, 24, 0, 24, 0, 36, 10, 36, 2, 24, 0, 32, 0, 40, 0, 24, 2, 42, 2, 40, 0
Offset: 1

Views

Author

Leroy Quet, Sep 05 2007

Keywords

Comments

An isolated totative, k, of n is a positive integer which is less than and coprime to n and is such that neither (k-1) nor (k+1) are coprime to n.
a(2n) = phi(2n), where phi(n) = A000010(n).
If k is an isolated totative so is n-k. - Robert G. Wilson v, Sep 13 2007
a(n)=0 for n's: A061345 "Odd prime powers". - Robert G. Wilson v, Sep 13 2007

Examples

			The positive integers which are <= 15 and are coprime to 15 are 1,2,4,7,8,11,13,14. Of these, 1 and 2 are adjacent, 7 and 8 are adjacent and 13 and 14 are adjacent. So the isolated totatives of 15 are 4 and 11. There are 2 of these, so a(15) = 2.
		

Crossrefs

Cf. A132953.

Programs

  • Mathematica
    fQ[k_, n_] := GCD[k, n] == 1 && GCD[k - 1, n] > 1 && GCD[k + 1, n] > 1; f[n_] := Length@ Select[ Rest[ Range@n - 1], fQ[ #, n] &]; Array[f, 89] (* Robert G. Wilson v *)
  • PARI
    A132952(n) = { my(s=0,pg=0,g=1,ng); for(k=1,n-1,if((1!=(ng=gcd(n,k+1)))&&(1==g)&&(1!=pg),s++); pg = g; g = ng); (s); }; \\ Antti Karttunen, Nov 01 2018

Extensions

Edited and extended by Robert G. Wilson v, Sep 13 2007

A280151 Expansion of Product_{k>=1} 1/(1 - floor(1/omega(2*k+1))*x^(2*k+1)), where omega() is the number of distinct prime factors (A001221).

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 18, 20, 23, 26, 29, 33, 37, 42, 46, 53, 58, 66, 74, 81, 91, 101, 113, 124, 139, 153, 169, 188, 207, 228, 252, 278, 304, 336, 369, 405, 444, 487, 533, 583, 640, 697, 763, 832, 908, 990, 1078, 1175, 1278
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 27 2016

Keywords

Comments

Number of partitions of n into odd prime powers (1 excluded).

Examples

			a(12) = 3 because we have [9, 3], [7, 5], [3, 3, 3, 3].
		

Crossrefs

Programs

  • Mathematica
    nmax = 67; CoefficientList[Series[Product[1/(1 - Floor[1/PrimeNu[2 k + 1]] x^(2 k + 1)), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} 1/(1 - floor(1/omega(2*k+1))*x^(2*k+1)).

A328258 a(n) = Sum_{d|n, gcd(d,n/d) = 1} (-1)^(d + 1) * d.

Original entry on oeis.org

1, -1, 4, -3, 6, -4, 8, -7, 10, -6, 12, -12, 14, -8, 24, -15, 18, -10, 20, -18, 32, -12, 24, -28, 26, -14, 28, -24, 30, -24, 32, -31, 48, -18, 48, -30, 38, -20, 56, -42, 42, -32, 44, -36, 60, -24, 48, -60, 50, -26, 72, -42, 54, -28, 72, -56, 80, -30, 60, -72, 62, -32, 80, -63, 84
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 09 2019

Keywords

Comments

Excess of sum of odd unitary divisors of n over sum of even unitary divisors of n.
a(n) = n+1 iff n is in A061345 \ {1}. - Bernard Schott, Mar 05 2023

Crossrefs

Programs

  • Magma
    [&+[(-1)^(d+1)*d:d in Divisors(n)|Gcd(d, n div d) eq 1]:n in [1..70]]; // Marius A. Burtea, Oct 10 2019
    
  • Maple
    f:= proc(n) local t;
      mul(1 - (-1)^t[1] * t[1]^t[2], t=ifactors(n)[2])
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 10 2019
  • Mathematica
    a[n_] := Sum[Boole[GCD[d, n/d] == 1] (-1)^(d + 1) d, {d, Divisors[n]}]; Table[a[n], {n, 1, 65}]
    a[1] = 1; a[n_] := Times @@ (1 - (-1)^First[#] First[#]^Last[#] & /@ FactorInteger[n]); Table[a[n], {n, 1, 65}]
  • PARI
    a(n) = sumdiv(n, d, if (gcd(d,n/d) == 1, (-1)^(d + 1) * d)); \\ Michel Marcus, Oct 10 2019

Formula

If n = Product (p_j^k_j) then a(n) = Product (1 - (-1)^p_j * p_j^k_j).
If n odd, a(n) = usigma(n), where usigma = A034448.
Sum_{k=1..n} a(k) ~ c * n^2, where c = zeta(2)/(14*zeta(3)) = A306633 / 14 = 0.0977451... . - Amiram Eldar, Nov 17 2022
From Amiram Eldar, Jan 28 2023: (Start)
a(n) = 2 * A192066(n) - A034448(n).
a(n) = A192066(n) - A360156(n/2) if n is even, and A192066(n) otherwise.
Dirichlet g.f.: (zeta(s)*zeta(s-1)/zeta(2*s-1))*(2^(2*s)-2^(s+2)+2)/(2^(2*s)-2). (End)

A064076 Lesser of odd twin prime powers (greater = A064077).

Original entry on oeis.org

3, 5, 7, 9, 11, 17, 23, 25, 27, 29, 41, 47, 59, 71, 79, 81, 101, 107, 125, 137, 149, 167, 179, 191, 197, 227, 239, 241, 269, 281, 311, 347, 359, 419, 431, 461, 521, 569, 599, 617, 641, 659, 727, 809, 821, 827, 839, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2001

Keywords

Comments

A001359 is a proper subsequence of A064076 (as A006512 is of A064077).

Examples

			a(8) = 25 = 5^2 and 25+2 = 27 = 3^3 = A064077(8); a(10) = 29^1 and 29 + 2 = 31^1 = A064077(10).
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Select[Range[1, 1200, 2], PrimePowerQ], 2, 1], Differences[#] == {2} &][[;; , 1]] (* Amiram Eldar, Mar 19 2025 *)

Formula

a(n) = A064077(n) - 2. - Amiram Eldar, Mar 19 2025
Previous Showing 11-20 of 49 results. Next