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-10 of 379 results. Next

A330828 The squares of the Fermat primes, (A019434(n))^2.

Original entry on oeis.org

9, 25, 289, 66049, 4295098369
Offset: 1

Views

Author

Walter Kehowski, Jan 06 2020

Keywords

Comments

Also the first element of the power-spectral basis of A330826. The second element of the power-spectral basis of A330826 is A001146(n+1), n=0..4.

Examples

			a(1) = 3^2 = 9. The spectral basis of A330826(1) = 12 is {9,4}, consisting of primes and powers.
		

Crossrefs

Programs

  • Maple
    F := n -> 2^(2^n) + 1;
    a := proc(n) if isprime(F(n)) then return F(n)^2 fi; end;
    [seq(a(n)),n=0..4)];
  • Mathematica
    (2^2^Select[Range[0,5],PrimeQ[2^(2^#)+1] &]+1)^2 (* Stefano Spezia, May 01 2025 *)

Formula

a(n) = A019434(n)^2.

A330829 Numbers of the form 2^(2*(2^n)+1)*F_n^2, where F_n is a Fermat prime A019434.

Original entry on oeis.org

72, 800, 147968, 8657174528, 36894614055915880448
Offset: 0

Views

Author

Walter Kehowski, Jan 06 2020

Keywords

Comments

Also numbers with power-spectral basis {(F_n-2)^2*F_n^2,(F_n^2-1)^2}.
The first element of the power-spectral basis of a(n) is A330830, and the second element is A330831. The first factor of a(n) is A000051(n) and the second factor is A330828.

Examples

			a(0) = 2^(2+1)*(2+1)^2 = 72, and the spectral basis is {(3-2)^2*3^2, (3^2-1)^2} = {9,64}, consisting of powers.
		

Crossrefs

Programs

  • Maple
    F := proc(n) return 2^(2^n)+1 end;
    G := proc(n) return 2^(2*(2^n)+1) end;
    a := proc(n) if isprime(F(n)) then return G(n)*F(n)^2 fi; end;
    [seq(a(n),n=0..4)];

Formula

a(n) = 2^(2*(2^n)+1)*(2^(2^n)+1)^2.

A330826 Numbers of the form 2^((2^n)+1)*F_n, where F_n is a Fermat prime, A019434.

Original entry on oeis.org

12, 40, 544, 131584, 8590065664
Offset: 1

Views

Author

Walter Kehowski, Jan 06 2020

Keywords

Comments

Also numbers with power-spectral basis {F_n^2, (F_n-1)^2}.
The first factor of a(n) is 2^A000051(n). The first element of the power-spectral basis of a(n) is A001146, and the second element is A330828.

Examples

			a(2) = 2^(2+1)*5 = 40, and the spectral basis of 40 is {25,16}, consisting of primes and powers.
		

Crossrefs

Programs

  • Maple
    F := n -> 2^(2^n)+1;
    a := proc(n) if isprime(F(n)) then return 2^((2^n)+1)*F(n) fi; end;

Formula

a(n) =2^A000051(n)*A019434(n).

A330830 Numbers of the form (F_n-2)^2*F_n^2, where F_n is a Fermat prime, A019434. Also the first element of the power-spectral basis of A330829.

Original entry on oeis.org

9, 225, 65025, 4294836225, 18446744065119617025
Offset: 1

Views

Author

Walter Kehowski, Jan 06 2020

Keywords

Comments

The second element of the power-spectral basis of A330829 is A330831. We also have a(n) = (2^(2*2^n)-1)^2.

Examples

			a(1) = (3-2)^2*3^2  =9.
		

Crossrefs

Programs

  • Maple
    a := proc(n) if isprime(2^(2^n)+1) then return (2^(2*2^n)-1)^2 fi; end;
    [seq(a(n),n=0..4)];

Formula

a(n) = (A019434(n)-2)^2*A019434(n)^2.

A330831 a(n) = (F_n^2 - 1)^2, where F_n is a Fermat prime, A019434.

Original entry on oeis.org

64, 576, 82944, 4362338304, 18447869990796263424
Offset: 1

Views

Author

Walter Kehowski, Jan 06 2020

Keywords

Comments

Also the second element of the power-spectral basis of A330829.
The first element of the power-spectral basis of A330829 is A330830.

Examples

			a(0) = (3^2 - 1)^2 = 64.
		

Crossrefs

Programs

  • Maple
    F := proc(n) return 2^(2^n)+1 end;
    a := proc(n) if isprime(F(n)) then return (F(n)^2-1)^2 fi; end;
    [seq(a(n),n=0..4)];

Formula

a(n) = (F(n)^2 - 1)^2, where F(n) = 2^(2^n)+1 is a Fermat prime.

A293291 Carmichael numbers m having a Fermat prime (A019434) factor such that A002322(m) = 2^k * p^2, where k is an integer and p is an odd prime.

Original entry on oeis.org

825265, 1210178305, 11113519105, 230864201601, 772350315265, 1540032424705, 204855497662465, 453644962192318465, 770522162068767745, 3070111619849131585, 44428201205269571987560724263876473913345
Offset: 1

Views

Author

Max Alekseyev, Oct 05 2017

Keywords

Comments

Tsumura (2017) proved that there are no other such Carmichael numbers if there are only five Fermat primes.
The prime p happens to equal 3 or 5 in all cases.

Crossrefs

A330825 Numbers of the form 2^(2^k)*F_k, where F_k is a Fermat prime, A019434.

Original entry on oeis.org

6, 20, 272, 65792, 4295032832
Offset: 1

Views

Author

Walter Kehowski, Jan 06 2020

Keywords

Comments

Also numbers with power-spectral basis {F_n,(F_n-1)^2}. The first element of the power-spectral basis of a(n) is A019434, and the second element is A001146.

Examples

			a(2) = 2^2*(2^2+1) = 20, and the spectral basis of 20 is {5,16}, consisting of primes and powers.
		

Crossrefs

Programs

  • Maple
    F := n -> 2^(2^n)+1;
    a := proc(n) if isprime(F(n)) then return 2^(2^n)*F(n) fi; end;
    [seq(a(n),n=0..4)];

Formula

a(n) = A001146(n-1)*A019434(n), n = 1..5. [Corrected by Georg Fischer, Dec 09 2022]

A168335 Numbers of the form A019434(i) + A000668(j).

Original entry on oeis.org

6, 8, 10, 12, 20, 24, 34, 36, 48, 130, 132, 144, 260, 264, 288, 384, 8194, 8196, 8208, 8448, 65540, 65544, 65568, 65664, 73728, 131074, 131076, 131088, 131328, 196608, 524290, 524292, 524304, 524544, 589824, 2147483650, 2147483652, 2147483664, 2147483904
Offset: 1

Views

Author

Jonathan Vos Post, Mar 05 2010

Keywords

Crossrefs

Cf. A174057.

Extensions

Corrected and extended by R. J. Mathar, Mar 06 2010

A242866 Union of 2*A019434 and the semiprimes in A000215.

Original entry on oeis.org

6, 10, 34, 514, 131074, 4294967297, 18446744073709551617, 340282366920938463463374607431768211457, 115792089237316195423570985008687907853269984665640564039457584007913129639937
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 24 2014

Keywords

Comments

The old definition was "Semiprimes of the form 2^(2^k) + 1 or 2^(2^k) + 2 for some k >= 0", but that does not include 10. So I replaced the old definition with the old comment, which seems a better fit. Question: is the sequence defined by the old definition in the OEIS? If not it should be added. - N. J. A. Sloane, Sep 03 2023

Crossrefs

Extensions

Definition edited by N. J. A. Sloane, Sep 02 2023

A000961 Powers of primes. Alternatively, 1 and the prime powers (p^k, p prime, k >= 1).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The term "prime power" is ambiguous. To a mathematician it means any number p^k, p prime, k >= 0, including p^0 = 1.
Any nonzero integer is a product of primes and units, where the units are +1 and -1. This is tied to the Fundamental Theorem of Arithmetic which proves that the factorizations are unique up to order and units. (So, since 1 = p^0 does not have a well defined prime base p, it is sometimes not regarded as a prime power. See A246655 for the sequence without 1.)
These numbers are (apart from 1) the numbers of elements in finite fields. - Franz Vrabec, Aug 11 2004
Numbers whose divisors form a geometrical progression. The divisors of p^k are 1, p, p^2, p^3, ..., p^k. - Amarnath Murthy, Jan 09 2002
These are also precisely the orders of those finite affine planes that are known to exist as of today. (The order of a finite affine plane is the number of points in an arbitrarily chosen line of that plane. This number is unique for all lines comprise the same number of points.) - Peter C. Heinig (algorithms(AT)gmx.de), Aug 09 2006
Except for first term, the index of the second number divisible by n in A002378, if the index equals n. - Mats Granvik, Nov 18 2007
These are precisely the numbers such that lcm(1,...,m-1) < lcm(1,...,m) (=A003418(m) for m>0; here for m=1, the l.h.s. is taken to be 0). We have a(n+1)=a(n)+1 if a(n) is a Mersenne prime or a(n)+1 is a Fermat prime; the converse is true except for n=7 (from Catalan's conjecture) and n=1, since 2^1-1 and 2^0+1 are not considered as Mersenne resp. Fermat prime. - M. F. Hasler, Jan 18 2007, Apr 18 2010
The sequence is A000015 without repetitions, or more formally, A000961=Union[A000015]. - Zak Seidov, Feb 06 2008
Except for a(1)=1, indices for which the cyclotomic polynomial Phi[k] yields a prime at x=1, cf. A020500. - M. F. Hasler, Apr 04 2008
Also, {A138929(k) ; k>1} = {2*A000961(k) ; k>1} = {4,6,8,10,14,16,18,22,26,32,34,38,46,50,54,58,62,64,74,82,86,94,98,...} are exactly the indices for which Phi[k](-1) is prime. - M. F. Hasler, Apr 04 2008
A143201(a(n)) = 1. - Reinhard Zumkeller, Aug 12 2008
Number of distinct primes dividing n=omega(n) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
Numbers n such that Sum_{p-1|p is prime and divisor of n} = Product_{p-1|p is prime and divisor of n}. A055631(n) = A173557(n-1). - Juri-Stepan Gerasimov, Dec 09 2009, Mar 10 2010
Numbers n such that A028236(n) = 1. Klaus Brockhaus, Nov 06 2010
A188666(k) = a(k+1) for k: 2*a(k) <= k < 2*a(k+1), k > 0; notably a(n+1) = A188666(2*a(n)). - Reinhard Zumkeller, Apr 25 2011
A003415(a(n)) = A192015(n); A068346(a(n)) = A192016(n); a(n)=A192134(n) + A192015(n). - Reinhard Zumkeller, Jun 26 2011
A089233(a(n)) = 0. - Reinhard Zumkeller, Sep 04 2013
The positive integers n such that every element of the symmetric group S_n which has order n is an n-cycle. - W. Edwin Clark, Aug 05 2014
Conjecture: these are numbers m such that Sum_{k=0..m-1} k^phi(m) == phi(m) (mod m), where phi(m) = A000010(m). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
Numbers whose (increasingly ordered) divisors are alternatingly squares and nonsquares. - Michel Marcus, Jan 16 2019
Possible numbers of elements in a finite vector space. - Jianing Song, Apr 22 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • M. Koecher and A. Krieg, Ebene Geometrie, Springer, 1993.
  • R. Lidl and H. Niederreiter, Introduction to Finite Fields and Their Applications, Cambridge 1986, Theorem 2.5, p. 45.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018
Cf. indices of record values of A003418; A000668 and A019434 give a member of twin pairs a(n+1)=a(n)+1.
A138929(n) = 2*a(n).
A028236 (if n = Product (p_j^k_j), a(n) = numerator of Sum 1/p_j^k_j). - Klaus Brockhaus, Nov 06 2010
A000015(n) = Min{term : >= n}; A031218(n) = Max{term : <= n}.
Complementary (in the positive integers) to sequence A024619. - Jason Kimberley, Nov 10 2015

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a000961 n = a000961_list !! (n-1)
    a000961_list = 1 : g (singleton 2) (tail a000040_list) where
    g s (p:ps) = m : g (insert (m * a020639 m) $ insert p s') ps
    where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 01 2012, Apr 25 2011
    
  • Magma
    [1] cat [ n : n in [2..250] | IsPrimePower(n) ]; // corrected by Arkadiusz Wesolowski, Jul 20 2012
    
  • Maple
    readlib(ifactors): for n from 1 to 250 do if nops(ifactors(n)[2])=1 then printf(`%d,`,n) fi: od:
    # second Maple program:
    a:= proc(n) option remember; local k; for k from
          1+a(n-1) while nops(ifactors(k)[2])>1 do od; k
        end: a(1):=1: A000961:= a:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 08 2013
  • Mathematica
    Select[ Range[ 2, 250 ], Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    Select[ Range[ 2, 250 ], Length[FactorInteger[ # ] ] == 1 & ]
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]^m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, n]; max = w], {n, 1, 1000}]; a (* Artur Jasinski *)
    Join[{1}, Select[Range[2, 250], PrimePowerQ]] (* Jean-François Alcover, Jul 07 2015 *)
  • PARI
    A000961(n,l=-1,k=0)=until(n--<1,until(lA000961(lim=999,l=-1)=for(k=1,lim, l==lcm(l,k) && next; l=lcm(l,k); print1(k,",")) \\ M. F. Hasler, Jan 18 2007
    
  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1) \\ Michael B. Porter, Sep 23 2009
    
  • PARI
    nextA000961(n)=my(m,r,p);m=2*n;for(e=1,ceil(log(n+0.01)/log(2)),r=(n+0.01)^(1/e);p=prime(primepi(r)+1);m=min(m,p^e));m \\ Michael B. Porter, Nov 02 2009
    
  • PARI
    is(n)=isprimepower(n) || n==1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    list(lim)=my(v=primes(primepi(lim)),u=List([1])); forprime(p=2,sqrtint(lim\1),for(e=2,log(lim+.5)\log(p),listput(u,p^e))); vecsort(concat(v,Vec(u))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primerange
    def A000961_list(limit): # following Python style, list terms < limit
        L = [1]
        for p in primerange(1, limit):
            pe = p
            while pe < limit:
                L.append(pe)
                pe *= p
        return sorted(L) # Chai Wah Wu, Sep 08 2014, edited by M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import primepi
    from sympy.ntheory.primetest import integer_nthroot
    def A000961(n):
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024
  • Sage
    def A000961_list(n):
        R = [1]
        for i in (2..n):
            if i.is_prime_power(): R.append(i)
        return R
    A000961_list(227) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A025473(n)^A025474(n). - David Wasserman, Feb 16 2006
a(n) = A117331(A117333(n)). - Reinhard Zumkeller, Mar 08 2006
Panaitopol (2001) gives many properties, inequalities and asymptotics, including a(n) ~ prime(n). - N. J. A. Sloane, Oct 31 2014, corrected by M. F. Hasler, Jun 12 2023 [The reference gives pi*(x) = pi(x) + pi(sqrt(x)) + ... where pi*(x) counts the terms up to x, so it is the inverse function to a(n).]
m=a(n) for some n <=> lcm(1,...,m-1) < lcm(1,...,m), where lcm(1...0):=0 as to include a(1)=1. a(n+1)=a(n)+1 <=> a(n+1)=A019434(k) or a(n)=A000668(k) for some k (by Catalan's conjecture), except for n=1 and n=7. - M. F. Hasler, Jan 18 2007, Apr 18 2010
A001221(a(n)) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
A008480(a(n)) = 1 for all n >= 1. - Alois P. Heinz, May 26 2018
Sum_{k=1..n} 1/a(k) ~ log(log(a(n))) + 1 + A077761 + A136141. - François Huppé, Jul 31 2024

Extensions

Description modified by Ralf Stephan, Aug 29 2014
Showing 1-10 of 379 results. Next