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

A068315 For numbers k such that A025474(k) > 1 and A025474(k+1) > 1, sequence gives A000961(k).

Original entry on oeis.org

8, 25, 121, 2187, 32761
Offset: 1

Views

Author

Naohiro Nomoto, Mar 08 2002

Keywords

Comments

Equivalently, prime powers (either A000961 or A246655) q such that q and the next prime power are both composite numbers. - Paolo Xausa, Oct 25 2023

Examples

			The interval (121,122,123,124,125) contains no primes, so 121 is in the sequence. - _Gus Wiseman_, Dec 24 2024
		

Crossrefs

Bisection of A068435.
For perfect powers instead of prime powers we have A116086, indices A274605.
The position of a(k) in the prime powers A246655 is A379156(k).
For just one prime we have A379157, indices A379155.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A031218 gives the greatest prime power <= n.
A046933 gives run-lengths of composites between primes.
A065514 gives the greatest prime power < prime(n), difference A377289.
A246655 lists the prime powers, differences A057820.
A366833 counts prime powers between primes, see A053607, A304521.
A366835 counts primes between prime powers.

Programs

  • Mathematica
    With[{upto=33000},Map[First,Select[Partition[Select[Range[upto],PrimePowerQ],2,1],NoneTrue[#,PrimeQ]&]]] (* Paolo Xausa, Oct 25 2023 *)

Formula

a(n) = A246655(A379156(n)). - Gus Wiseman, Dec 24 2024

Extensions

Definition corrected by Jinyuan Wang, Sep 05 2020

A097621 In canonical prime factorization of n replace p^e with its index in A000961.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 6, 7, 8, 10, 9, 12, 10, 12, 15, 11, 12, 16, 13, 20, 18, 18, 14, 21, 15, 20, 16, 24, 17, 30, 18, 19, 27, 24, 30, 32, 20, 26, 30, 35, 21, 36, 22, 36, 40, 28, 23, 33, 24, 30, 36, 40, 25, 32, 45, 42, 39, 34, 26, 60, 27, 36, 48, 28, 50, 54, 29, 48, 42, 60, 30, 56, 31
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 17 2004

Keywords

Comments

The definition of the sequence has been corrected, given that it uses A095874, the indices in the list A000961 of "powers of primes" starting with A000961(1) = 1, rather than A322981, index of p^e in the list of prime powers A246655, as written in the original definition. See A333235 for the variant of this sequence which uses A322981 and A246655 instead, maybe the more natural choice given that the factorization of integers consists of prime powers > 1. - M. F. Hasler, Jun 15 2021

Examples

			n=600 = 2^3 * 3 * 5^2 -> A095874(8)*A095874(3)*A095874(25) = 7 * 3 * 15 = 315.
		

Crossrefs

Cf. A000961 (powers of primes), A246655 (prime powers), A003963, A018266, A095874 (index of n = p^e in A000961).
Cf. A322981 (index of n = p^e in A246655), A333235 (variant of this sequence).

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    Primes:= select(isprime,[2, seq(2*i+1,i=1..(N-1)/2)]):
    PP:= sort([1,seq(seq(p^k, k=1..floor(log[p](N))),p=Primes)]):
    for n from 1 to nops(PP) do B[PP[n]]:= n od:
    seq(mul(B[f[1]^f[2]],f=ifactors(n)[2]),n=1..N); # Robert Israel, Sep 02 2015
  • Mathematica
    pp = Select[Range@100, Length[FactorInteger[#]] == 1 &]; a = Table[Times @@ (Position[pp, #][[1, 1]] & /@ (#[[1]]^#[[2]] & /@ FactorInteger[n])), {n, 73}] (* Ivan Neretin, Sep 02 2015 *)
  • PARI
    f(n) = if(isprimepower(n), sum(i=1, logint(n, 2), primepi(sqrtnint(n, i)))+1, n==1); \\ A095874
    a(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); \\ Michel Marcus, May 29 2021
    A097621(n)=vecprod([A095874(f[1]^f[2])|f<-factor(n)~]) \\ M. F. Hasler, Jun 15 2021
    
  • Python
    from math import prod
    from sympy import primepi, integer_nthroot, factorint
    def A097621(n): return prod(1+int(primepi(m:=p**e)+sum(primepi(integer_nthroot(m,k)[0]) for k in range(2,m.bit_length()))) for p,e in factorint(n).items()) # Chai Wah Wu, Jan 19 2025

Formula

Multiplicative with: p^e -> A095874(p^e), p prime.
a(A000961(n)) = n; a(a(n)) = A097622(n); a(a(a(n))) = A097623(n);
a(n) <= n; a(n) = n iff 60 mod n = 0: a(A018266(n)) = A018266(n);
a(A097624(n)) = n and a(m) <> n for n < A097624(n).

Extensions

Definition corrected by M. F. Hasler, Jun 16 2021
Example corrected by Ray Chandler, Jun 30 2021

A192015 Arithmetic derivative of prime powers: a(n) = A003415(A000961(n)).

Original entry on oeis.org

0, 1, 1, 4, 1, 1, 12, 6, 1, 1, 32, 1, 1, 1, 10, 27, 1, 1, 80, 1, 1, 1, 1, 14, 1, 1, 1, 192, 1, 1, 1, 1, 108, 1, 1, 1, 1, 1, 1, 1, 1, 22, 75, 1, 448, 1, 1, 1, 1, 1, 1, 1, 1, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 405, 1, 1024, 1, 1, 1, 1, 1, 1, 1, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(A000040(n)) = 1; a(A002808(n)) > 1;
A001787, A027471, A100484, A079705 and A051674 are subsequences;
A001787 and A024622 give record values and where they occur;
A192016(n) = A003415(a(n)).

Programs

  • Haskell
    a192015 = a003415 . a000961  -- Reinhard Zumkeller, Apr 16 2014
    
  • Mathematica
    Join[{0}, Reap[For[n = 1, n <= 300, n++, f = FactorInteger[n]; If[Length[f] == 1, Sow[n*Total[Apply[#2/#1&, f, {1}]]]]]][[2, 1]]] (* Jean-François Alcover, Feb 21 2014 *)
  • Python
    from sympy import primepi, integer_nthroot, factorint
    def A192015(n):
        if n == 1: return 0
        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 sum((m*e//p for p,e in factorint(m).items())) # Chai Wah Wu, Aug 15 2024

Formula

a(n) = A025474(n) * A025473(n)^(A025474(n) - 1).

A024620 Positions of primes among the powers of primes (A000961).

Original entry on oeis.org

2, 3, 5, 6, 9, 10, 12, 13, 14, 17, 18, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A024621.
Cf. A001222 (bigomega), A025474, A056604, A027883.

Programs

  • Haskell
    a024620 n = a024620_list !! (n-1)
    a024620_list = filter ((== 1) . a025474) [1..]
    -- Reinhard Zumkeller, May 01 2015
    
  • Mathematica
    a[n_] := PrimeOmega[LCM @@ Range@Prime@n] + 1; Array[a, 100] (* Amiram Eldar, Dec 02 2018 *)
  • PARI
    lista(nn) = my(powpr = select((i->((omega(i)==1) || (i==1))), [1..nn])); for (i = 1, #powpr, if (isprime(powpr[i]), print1(i, ", ")); ); \\ Michel Marcus, Jun 03 2021
    
  • Python
    from sympy import prime, primepi, integer_nthroot
    def A024620(n):
        x = prime(n)
        return n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())) # Chai Wah Wu, Nov 05 2024

Formula

A025474(a(n)) = 1. - Reinhard Zumkeller, May 01 2015
a(n) = A001222(A056604(n)) + 1. - Eric Desbiaux, Dec 02 2018
From Ridouane Oudra, Oct 18 2020: (Start)
a(n) = A027883(n) + 1;
a(n) = A025528(A000040(n)) + 1;
a(n) = A065515(A000040(n)). (End)

A024622 Position of 2^n among the powers of primes (A000961).

Original entry on oeis.org

1, 2, 4, 7, 11, 19, 28, 45, 71, 118, 199, 341, 605, 1079, 1962, 3591, 6636, 12371, 23151, 43580, 82268, 155922, 296348, 564689, 1078556, 2064590, 3959000, 7605135, 14632961, 28195587, 54403836, 105102702, 203287170, 393625232, 762951923, 1480223717, 2874422304
Offset: 0

Views

Author

Keywords

Comments

Number of prime powers <= 2^n. - Jon E. Schoenfield, Nov 06 2016
A000961(a(n)) = A000079(n); also position of record values in A192015: A001787(n) = A192015(a(n)). - Reinhard Zumkeller, Jun 26 2011

Crossrefs

Programs

  • Mathematica
    {1}~Join~Flatten[1 + Position[Select[Range[10^6], PrimePowerQ], k_ /; IntegerQ@ Log2@ k ]] (* Michael De Vlieger, Nov 14 2016 *)
  • PARI
    lista(nn) = {v = vector(2^nn, i, i); vpp = select(x->ispp(x), v); print1(1, ", "); for (i=1, #vpp, if ((vpp[i] % 2) == 0, print1(i, ", ")););} \\ Michel Marcus, Nov 17 2014
    
  • PARI
    a(n)=sum(k=1,n,primepi(sqrtnint(2^n,k)))+1 \\ Charles R Greathouse IV, Nov 21 2014
    
  • PARI
    a(n)=my(s=0);for(i=1, 2^n, isprimepower(i) && s++);s+1 \\ Dana Jacobsen, Mar 23 2021
    
  • Perl
    use ntheory ":all"; for my $n (0..20) { my $s=1; is_prime_power($) && $s++ for 1..2**$n; print "$n $s\n" } # _Dana Jacobsen, Mar 23 2021
    
  • Perl
    use ntheory ":all"; for my $n (0..64) { my $s = ($n < 1) ? 1 : vecsum(map{prime_count(rootint(powint(2,$n)-1,$))}1..$n)+2; print "$n $s\n"; } # _Dana Jacobsen, Mar 23 2021
    
  • Perl
    # with b-file for pi(2^n)
    perl -Mntheory=:all -nE 'my($n,$pc)=split; say "$n ", addint($pc,vecsum( map{prime_count(rootint(powint(2,$n),$))} 2..$n )+1);'  b007053.txt  # _Dana Jacobsen, Mar 23 2021
    
  • Python
    from sympy import primepi, integer_nthroot
    def A024622(n):
        x = 1<Chai Wah Wu, Nov 05 2024
  • SageMath
    def a(n): return sum(prime_pi(ZZ(2^n).nth_root(k+1,truncate_mode=1)[0]) for k in range(n))+1 # Dana Jacobsen, Mar 23 2021
    

Formula

From Ridouane Oudra, Oct 26 2020: (Start)
a(n) = 1 + Sum_{i=1..n} pi(floor(2^(n/i))), where pi(n) = A000720(n);
a(n) = 1 + A182908(n). (End)
a(n) = A025528(2^n)+1. - Pontus von Brömssen, Sep 28 2024

Extensions

a(28)-a(36) from Hiroaki Yamanouchi, Nov 21 2014
a(46)-a(53) corrected by Hiroaki Yamanouchi, Nov 15 2016

A335866 Number of classes of simple difference sets of the Singer type (m^2 + m + 1, m + 1, 1) with m = m(n) = A000961(n), for n >= 1.

Original entry on oeis.org

1, 2, 4, 2, 10, 12, 8, 12, 36, 40, 12, 102, 84, 156, 60, 84, 264, 220, 60, 264, 574, 420, 720, 252, 816, 1180, 768, 144, 840, 1704, 1200, 1176, 432, 2196, 2670, 2112, 3434, 2380, 3024, 2280, 3960, 1296, 1656, 3612, 672, 5764, 5184, 3984, 6120, 4368, 5512, 4752, 9352, 3120, 10034, 9204, 7176, 9360, 7128
Offset: 1

Views

Author

Wolfdieter Lang, Jul 26 2020

Keywords

Comments

For details on these simple difference sets see A333852, with references, and a W. Lang link.
The formula given below was conjectured by Singer for n >= 2 on p. 383. See also the table on p. 384.
This conjecture was later proved by Berman.

Examples

			n = 2, m(2) = 2 = 2^1, a(2) = phi(7)/(3*1) = 6/3 = 2. There are two classes of type (7,3,1) (Fano plane), with representatives {0, 1, 3} and {0, 1, 5}. The two equivalence classes (by elementwise addition of 1, 2, ..., 6 modulo 7) are Dev({0, 1, 3}) = {{0, 1, 3}, {0, 2, 6}, {0, 4, 5}, {1, 2, 4}, {1, 5, 6}, {2, 3, 5}, {3, 4, 6}, and Dev({0, 1, 5}) = {{0, 1, 5}, {0, 2, 3}, {0, 4, 6}, {1, 2, 6}, {1, 3, 4}, {2, 4, 5}, {3, 5, 6}}.
		

Crossrefs

Programs

  • PARI
    print1(1); for(q=2, 193 , if(n=isprimepower(q), print1(", ", eulerphi(q^2+q+1)/(3*n)))) \\ Martin Becker, Jun 11 2024

Formula

a(1) = 1, and a(n) = phi(v(n))/(3*e(n)), with phi = A000010 (Euler's totient), v(n) = A335865(n) = m(n)^2 + m(n) + 1, with m(n) = A000961(n), and e(n) = A025474(n), the exponent of the prime power dividing m(n), for n >= 2.

A291785 Iterate the map A291784: k -> (psi(k)+phi(k))/2, starting with n, until a power of a prime (A000961) is reached, or -1 if that never happens.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 11, 16, 13, 16, 16, 16, 17, 23, 19, 23, 23, 23, 23, 47, 25, 27, 27, 47, 29, 47, 31, 32, 83, 83, 83, 83, 37, 47, 47, 47, 41, 83, 43, 47, -1, 47, 47, -1, 49, -1, 83, 83, 53, 83, -1, -1, 59, 59, 59, -1, 61, 83, 83, 64, 83, 83, 67, -1, -1, -1, 71, -1, 73
Offset: 1

Views

Author

N. J. A. Sloane, Sep 02 2017

Keywords

Comments

Primes and prime powers are fixed points under the map f(k) = (psi(k)+phi(k))/2. (If n = p^k, then psi(n) = p^k(1+1/p), phi(n) = p^k(1-1/p), and their average is p^k, so n is a fixed point under the map.)
Since f(n)>n if n is not a prime power, there can be no nontrivial cycles.
Wall (1985) observes that the trajectories of 45 and 50 are unbounded, so a(45) = a(50) = -1.
Also 48 and many more terms seem to have unbounded trajectories. - Hugo Pfoertner, Sep 03 2017.
Obviously any number in the trajectory of a number with unbounded trajectory (in particular that of 45, A291787) again has this property. A291788 is the union of all these. - M. F. Hasler, Sep 03 2017

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 147.

Crossrefs

Programs

  • PARI
    A291785(n,L=n)={for(i=0,L,isprimepower(n=A291784(n))&&return(n));(-1)^(n>1)} \\ The search limit L=n is only experimental but appears quite conservative w.r.t. known data, cf. A291786. The algorithm assumes that there are no cycles except for the powers of primes. - M. F. Hasler, Sep 03 2017

Extensions

More terms from Hugo Pfoertner, Sep 03 2017

A302040 Numbers k such that A078898(k) is a power of 2; an analog for A000961 based on factorization-kind of process involving the sieve of Eratosthenes (A083221).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 21, 23, 25, 29, 31, 32, 37, 41, 43, 45, 47, 49, 53, 55, 59, 61, 64, 67, 71, 73, 79, 83, 89, 91, 93, 97, 101, 103, 107, 109, 113, 115, 121, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 189, 191, 193, 197, 199, 203, 211, 223, 227, 229, 233, 235, 239, 241, 247, 251, 256, 257
Offset: 1

Views

Author

Antti Karttunen, Apr 02 2018

Keywords

Comments

Numbers k for which A302041(k) < 2, or equally, for which A302044(k) = 1.
Sequence A250245(A000961(k)) sorted into ascending order, or in other words, numbers k such that A250246(k) is a prime power (in A000961).
Numbers k such that all terms in iteration sequence k, A302042(k), A302042(A302042(k)), A302042(A302042(A302042(k))), ..., have an equal smallest prime factor (A020639) before the sequence settles to 1, in other words, that they all stay on the same row of A083221. This also forces the column position of each (A078898) to be a power of 2 (A000079).

Examples

			For k = 21 = 3*7, the smallest prime factor is 3. A302042(21) = 9, and A302042(9) = 3, both (9 and 3) which also have 3 as their smallest prime factor, and after that the sequence settles to 1, as A302042(3) = 1, thus 21 is included in this sequence.
For k = 27 = 3*3*3, the smallest prime factor is 3. However, A302042(27) = 7, thus 27 is not included in this sequence.
		

Crossrefs

Programs

  • PARI
    for(n=1,257,if(2>A302041(n),print1(n,","))); \\ Other code as in A302041.

A335865 Moduli a(n) = v(n) for the simple difference sets of Singer type of order m(n) (v(n), m(n)+1, 1) in the additive group modulo v(n) = m(n)^2 + m(n) + 1, with m(n) = A000961(n).

Original entry on oeis.org

3, 7, 13, 21, 31, 57, 73, 91, 133, 183, 273, 307, 381, 553, 651, 757, 871, 993, 1057, 1407, 1723, 1893, 2257, 2451, 2863, 3541, 3783, 4161, 4557, 5113, 5403, 6321, 6643, 6973, 8011, 9507, 10303, 10713, 11557, 11991, 12883, 14763, 15751
Offset: 1

Views

Author

Wolfdieter Lang, Jul 26 2020

Keywords

Comments

For details on these difference sets see A333852, with references, and a W. Lang link.
Because these simple difference sets of Singer type of order m = m(n) in the addive group (Z_{v(n)}, +) = RS(v(n)) = {0, 1, ..., v(n)-1} are also simple symmetric balanced incomplete block designs (BIBD), the number of blocks b(n) is also v(n) = a(n). This is the number of simple difference sets of each of the A335865(n) classes.
From Ed Pegg Jr, May 16 2019, edited by Hugo Pfoertner, May 13 2024: (Start)
(n^2+n+1,n+1) difference sets exist when n is a prime power.
(7,3), (1,2,4)
(13,4), (0,1,3,9)
(21,5), (3,6,7,12,14) (A095029)
(31,6), (1,5,11,24,25,27) (A095030)
(57,8), (0,1,6,15,22,26,45,55) (A095032)
(73,9), (0,1,12,20,26,30,33,35,57) (A095035)
(91,10), (0,2,6,7,18,21,31,54,63,71) (A095036)
(133,12), (1,10,11,13,27,31,68,75,83,110,115,121) (A095038)
(183,14), (1,13,20,21,23,44,61,72,77,86,90,116,122,169) (A095040) (End)
Is a(n) = A138077(n-1)? - R. J. Mathar, Sep 11 2020

Examples

			n = 2, m(2) = 2, a(2) = 2^2 + 2 + 1 = 7. The simple Singer difference set of order 2 is denoted by (7, 3, 1) (Fano plane). There are two classes (A335866(2) = 2) obtained from the representative difference sets {0, 1, 3} and {0, 1, 5} by element-wise addition of 1, 2, ..., 6 taken modulo 7. Each class consists of 7 simple difference sets.
		

Crossrefs

Formula

a(n) = m(n)^2 + m(n) + 1 , with m(n) = A000961(n), for n >= 1.

Extensions

Comments about difference sets moved from A138077 to here by Max Alekseyev, Apr 05 2022

A344975 Numbers k such that A011772(k) divides A344875(k), but k is not a power of prime (in A000961).

Original entry on oeis.org

6, 10, 18, 21, 24, 26, 28, 34, 36, 39, 40, 50, 55, 57, 58, 68, 74, 75, 78, 82, 93, 96, 98, 100, 106, 111, 120, 122, 129, 136, 146, 147, 150, 155, 162, 164, 171, 178, 183, 194, 196, 201, 202, 203, 205, 218, 219, 222, 224, 226, 237, 242, 250, 253, 274, 288, 291, 292, 294, 298, 300, 301, 305, 309, 314, 324, 327, 333
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2021

Keywords

Comments

This is not a subsequence of A344882. The first terms of this sequence that do not occur there are: 900, 1260, 1560, ... etc, see A344694. First terms of A344882 not present here are: 60, 66, 88, 92, 105, etc.

Crossrefs

Intersection of A024619 and A344974.
Cf. also A344595, A344694, A344978 (subsequences).

Programs

Previous Showing 21-30 of 1154 results. Next