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

A024619 Numbers that are not powers of primes p^k (k >= 0); complement of A000961.

Original entry on oeis.org

6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 111, 112
Offset: 1

Views

Author

Keywords

Comments

The sequence of numbers divisible by a prime number of primes coincides with this up to 210, which has 4 prime factors. - Lior Manor, Aug 23 2001
A085970(n) = Max{k: a(k)<=n}.
Numbers n such that LCM of proper divisors of n equals neither 1 nor n. - Labos Elemer, Dec 01 2004
a(n) provides bases b in which automorphic numbers m^2 ending with m in base b exist. In the complement there aren't any automorphic numbers. - Martin Renner, Dec 07 2011
Numbers with at least 2 distinct prime factors. - Jonathan Sondow, Oct 17 2013
There exists an equiangular n-gon whose edge lengths form a permutation of 1, 2, ..., n if and only if n is in the sequence (see Woeginger's survey and Munteanu & Munteanu). - Jonathan Sondow, Oct 17 2013
Numbers that are the product of two relatively prime factors. These numbers are used in testing a sequence for multiplicativity. - Michael Somos, Jun 02 2015
A theorem from Donald McCarthy: Let d be any positive integer which is not a prime power; then there exists a finite group whose order is divisible by d but which contains no subgroup of order d (see link and A340511). - Bernard Schott, Dec 04 2021

Crossrefs

Cf. A000040, A000961 (complement), A001221, A014963, A020500, A085970.
Cf. A340511.
Subsequence of A080257.

Programs

  • Haskell
    a024619 n = a024619_list !! (n-1)
    a024619_list = filter ((== 0) . a010055) [1..]
    -- Reinhard Zumkeller, Nov 17 2011
    
  • Magma
    IsA024619:=func< n | not IsPrime(n) and not (t and IsPrime(b) where t, b, A024619(n)%20%5D;%20//%20_Klaus%20Brockhaus">:=IsPower(n)) >; [ n: n in [2..200] | IsA024619(n) ]; // _Klaus Brockhaus, Feb 25 2011
    
  • Maple
    a := proc(n) numtheory[factorset](n); if 1 < nops(%) then n else NULL fi end:
    seq(a(i), i=1..110); # Peter Luschny, Aug 11 2009
  • Mathematica
    Select[Range@111, Length@FactorInteger@# > 1 &] (* Robert G. Wilson v, Dec 07 2005 *)
  • PARI
    is(n)=n>5 && !isprimepower(n) \\ Charles R Greathouse IV, Mar 21 2013
    
  • Python
    from sympy import primepi
    from sympy.ntheory.primetest import integer_nthroot
    def A024619(n):
        def f(x): return int(n+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 A024619_list(n) :
        return [k for k in (2..n) if not k.is_prime() and not k.is_prime_power()]
    A024619_list(112)  # Peter Luschny, Feb 03 2012 [corrected by Terry D. Grant, Sep 16 2020]
    

Formula

A001221(a(n)) > 1.
A014963(a(n)) = 1.
A020500(a(n)) = 1. - Benoit Cloitre, Aug 26 2003
A010055(a(n)) = 0. - Reinhard Zumkeller, Nov 17 2011
a(n) ~ n. - Charles R Greathouse IV, Mar 21 2013
a(n) ~ n - pi(n) [See Panaitopol]. - N. J. A. Sloane, Sep 27 2020
A118887(a(n)) > 0. - Jonathan Sondow, Oct 17 2013

A057820 First differences of sequence of consecutive prime powers (A000961).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, 3, 4, 2, 6, 2, 2, 6, 8, 4, 2, 4, 2, 4, 8, 4, 2, 1, 3, 6, 2, 10, 2, 6, 6, 4, 2, 4, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 2, 8, 5, 1, 6, 6, 2, 6, 4, 2, 6, 4, 14, 4, 2, 4, 14, 6, 6, 4, 2, 4, 6, 2, 6, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10
Offset: 1

Views

Author

Labos Elemer, Nov 08 2000

Keywords

Comments

a(n) = 1 iff A000961(n) = A006549(k) for some k. - Reinhard Zumkeller, Aug 25 2002
Also run lengths of distinct terms in A070198. - Reinhard Zumkeller, Mar 01 2012
Does this sequence contain all positive integers? - Gus Wiseman, Oct 09 2024

Examples

			Odd differences arise in pairs in neighborhoods of powers of 2, like {..,2039,2048,2053,..} gives {..,11,5,..}
		

Crossrefs

For perfect-powers (A001597) we have A053289.
For non-perfect-powers (A007916) we have A375706.
Positions of ones are A375734.
Run-compression is A376308.
Run-lengths are A376309.
Sorted positions of first appearances are A376340.
The second (instead of first) differences are A376596, zeros A376597.
Prime-powers:
- terms: A000961 or A246655, complement A024619
- differences: A057820 (this), first appearances A376341
- anti-runs: A373576, A120430, A006549, A373671
Non-prime-powers:
- terms: A361102
- differences: A375708 (ones A375713)
- anti-runs: A373679, A373575, A255346, A373672

Programs

  • Haskell
    a057820_list = zipWith (-) (tail a000961_list) a000961_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Maple
    A057820 := proc(n)
            A000961(n+1)-A000961(n) ;
    end proc: # R. J. Mathar, Sep 23 2016
  • Mathematica
    Map[Length, Split[Table[Apply[LCM, Range[n]], {n, 1, 150}]]] (* Geoffrey Critzer, May 29 2015 *)
    Join[{1},Differences[Select[Range[500],PrimePowerQ]]] (* Harvey P. Dale, Apr 21 2022 *)
  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1)
    n_prev=1;for(n=2,500,if(isA000961(n),print(n-n_prev);n_prev=n)) \\ Michael B. Porter, Oct 30 2009
    
  • Python
    from sympy import primepi, integer_nthroot
    def A057820(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)
        r, k = m, f(m)+1
        while r != k: r, k = k, f(k)+1
        return r-m # Chai Wah Wu, Sep 12 2024

Formula

a(n) = A000961(n+1) - A000961(n).

Extensions

Offset corrected and b-file adjusted by Reinhard Zumkeller, Mar 03 2012

A286708 Powerful numbers (A001694) that are not prime powers (A000961).

Original entry on oeis.org

36, 72, 100, 108, 144, 196, 200, 216, 225, 288, 324, 392, 400, 432, 441, 484, 500, 576, 648, 675, 676, 784, 800, 864, 900, 968, 972, 1000, 1089, 1125, 1152, 1156, 1225, 1296, 1323, 1352, 1372, 1444, 1521, 1568, 1600, 1728, 1764, 1800, 1936, 1944, 2000, 2025, 2116, 2304, 2312, 2500, 2592, 2601, 2700, 2704, 2744
Offset: 1

Views

Author

Ilya Gutkovskiy, May 13 2017

Keywords

Comments

If a prime p divides a(n) then p^2 must also divide a(n) and number of distinct primes dividing a(n) > 1.
Intersection of A001694 and A024619.

Examples

			-------------------------------
| n | a(n) | prime            |
|   |      | factorization    |
|------------------------------
| 1 | 36   | {{2, 2}, {3, 2}} |
| 2 | 72   | {{2, 3}, {3, 2}} |
| 3 | 100  | {{2, 2}, {5, 2}} |
| 4 | 108  | {{2, 2}, {3, 3}} |
| 5 | 144  | {{2, 4}, {3, 2}} |
| 6 | 196  | {{2, 2}, {7, 2}} |
| 7 | 200  | {{2, 3}, {5, 2}} |
| 8 | 216  | {{2, 3}, {3, 3}} |
| 9 | 225  | {{3, 2}, {5, 2}} |
-------------------------------
a(n) = p_1^e_1*p_2^e_2*... : {{p_1, e_1}, {p_2, e_2}, ...}.
		

Crossrefs

Programs

  • Maple
    N:= 10000:
    S:= {1}: P:= {1}:
    p:= 1:
    do
      p:= nextprime(p);
      if p^2 > N then break fi;
      S:= map(s -> (s, seq(s*p^k, k = 2 .. floor(log[p](N/s)))), S);
      P:= P union {seq(p^k, k=2..floor(log[p](N)))}:
    od:
    sort(convert(S minus P, list)); # Robert Israel, May 14 2017
  • Mathematica
    Select[Range@2750, Min@FactorInteger[#][[All, 2]] > 1 && ! PrimePowerQ[#] &]
    (* Second program *)
    nn = 2^25; Select[Rest@ Union@ Flatten@ Table[a^2*b^3, {b, nn^(1/3)}, {a, Sqrt[nn/b^3]}], ! PrimePowerQ[#] &] (* Michael De Vlieger, Jun 22 2022 *)
  • Python
    from sympy import primefactors, factorint
    print([n for n in range(4,2745) if len(primefactors(n)) > 1 and min(list(factorint(n).values())) > 1]) # Karl-Heinz Hofmann, Feb 07 2023
    
  • Python
    from math import isqrt
    from sympy import integer_nthroot, primepi, mobius
    def A286708(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        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):
            c, l = n+x, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            c -= squarefreepi(integer_nthroot(x,3)[0])-l
            return c+1+sum(primepi(integer_nthroot(x, k)[0]) for k in range(2, x.bit_length()))
        return bisection(f,n,n) # Chai Wah Wu, Sep 10 2024

Formula

Sum_{n>=1} 1/a(n) = zeta(2)*zeta(3)/zeta(6) - Sum_{p prime} 1/(p*(p-1)) - 1 = A082695 - A136141 - 1 = 0.17043976777096407719... - Amiram Eldar, Feb 12 2021

A051451 a(n) = lcm{ 1,2,...,x } where x is the n-th prime power (A000961).

Original entry on oeis.org

1, 2, 6, 12, 60, 420, 840, 2520, 27720, 360360, 720720, 12252240, 232792560, 5354228880, 26771144400, 80313433200, 2329089562800, 72201776446800, 144403552893600, 5342931457063200, 219060189739591200, 9419588158802421600, 442720643463713815200
Offset: 1

Views

Author

Labos Elemer, Dec 11 1999

Keywords

Comments

This sequence is the list of distinct terms in A003418.
This may be the "smallest" product-based numbering system that has a unique finite representation for every rational number. In this base 1/2 = .1 (1*1/2), 1/3 = .02 (0*1/2 + 2*1/6), 1/5 = .0102 (0*1/2 + 1*1/6 + 0*1/12 + 2*1/60). - Russell Easterly, Oct 03 2001
Partial products of A025473, prime roots of the prime powers.
Conjecture: For every n > 2, there exists a twin prime pair [p, p+2] with p < a(n), such that [a(n)+p, a(n)+p+2] is also a twin prime pair. Example: For n=6 we can take p=11, because for a(6) = 420 is [420+11, 420+13] = [431, 433] also a twin prime pair. This has been verified for 2 < n <= 200. - Mike Winkler, Sep 12 2013, May 09 2014
The prime powers give all values, and do so uniquely. (Other positive integers give repeated values.) - Daniel Forgues, Apr 28 2014
"LCM numeral system": a(n+1) is place value for index n, n >= 0; a(-n+1) is (place value)^(-1) for index n, n < 0. - Daniel Forgues, May 03 2014
Repetitions removed from slowest growing integer series A003418 with integers > 0 converging to 0 in the ring Z^ of profinite integers. Both A003418 and the present sequence may be used as a replacement for the usual "factorial system" for coding profinite integers. - Herbert Eberle, May 01 2016
Every term of this sequence is deeply composite (A095848). Moreover, the terms of this sequence are the "special deeply composite numbers", in analogy to the special highly composite numbers (A106037). A special highly composite number is a highly composite number (A002182) that divides every larger highly composite number. In the same fashion, the deeply composite numbers that divide every larger deeply composite number are just the terms of this sequence. This follows from the formula for deeply composite numbers. - Hal M. Switkay, Jun 08 2021
From Bill McEachen, Apr 28 2023: (Start)
Every term belongs to A025487.
Conjecture: Every term = A001013(j)*A129912(k) for some j,k. (End)

Examples

			lcm[1,...,n] is 2520 for n=9 and 10. The smallest such n's are always prime powers, where A003418 jumps.
		

Crossrefs

Programs

  • Haskell
    a051451 n = a051451_list !! (n-1)
    a051451_list = scanl1 lcm a000961_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Mathematica
    f[n_] := LCM @@ Range@ n; Union@ Array[f, 41] (* Robert G. Wilson v, Jul 11 2011 *)
    Join[{1},LCM@@Range[#]&/@Select[Range[50],PrimePowerQ]] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    do(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))); v=vecsort(concat(v, Vec(u))); for(i=2,#v,v[i]=lcm(v[i],v[i-1])); v \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    {lim=100; n=1; i=1; j=1; until(n==lim, until(a!=j, a=lcm(j,i+1); i++;); j=a; n++; print(n" "a););} \\ Mike Winkler, Sep 07 2013
    
  • PARI
    x=1;for(i=1,100,if(omega(i)==1,x*=factor(i)[1,1])) \\ Florian Baur, Apr 11 2022
    
  • Python
    from math import prod
    from sympy import primepi, integer_nthroot, integer_log, primerange
    def A051451(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 prod(p**integer_log(m, p)[0] for p in primerange(m+1)) # Chai Wah Wu, Aug 15 2024
  • Sage
    def A051451_list(n):
        a = [ ]
        L = [1]
        for i in (1..n):
           a.append(i)
           if (is_prime_power(i) == 1):
               L.append(lcm(a))
        return(L)
    A051451_list(42) # Jani Melik, Jul 07 2022
    

Formula

a(n) = A003418(A000961(n)).
a(n) = A208768(n) + 1. - Reinhard Zumkeller, Mar 01 2012
Sum_{n>=1} 1/a(n) = A064890. - Amiram Eldar, Nov 16 2020

Extensions

Minor edits by Ray Chandler, Jan 16 2009

A174965 Length of the n-th run of consecutive terms in A000961.

Original entry on oeis.org

5, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Pahikkala Jussi, Apr 02 2010

Keywords

Comments

Let b(n) be partial sums of this sequence, as b(0) = 0, b(n) = b(n-1) + a(n). Then 2's in this sequence occur at certain positions k so that A000961(b(k))-1 = one of the terms of A006549. E.g., a(6625) = 2, and b(6625) = 6637, with A000961(6637) = 65537, the end of 2-run (65536,65537) in A000961. (The start of that 2-run, 65536, is listed as A006549(12), and 12 = 6637-6625.) - Antti Karttunen, Jul 24 2017
Position of 2s: {5, 11, 36, 62, 1068, 6625, 12358, 43566, ...},
position of 3: {2}, position of 5: {1}. All other positions pertain to 1 for A000961(n) <= 10^8. - Michael De Vlieger, Jul 25 2017

Examples

			n a(n) run in A000961
1:  5 (1 2 3 4 5)
2:  3 (7 8 9)
3:  1 (11)
4:  1 (13)
5:  2 (16 17)
6:  1 (19)
7:  1 (23)
8:  1 (25)
9:  1 (27)
10: 1 (29)
11: 2 (31 32)
12: 1 (37)
13: 1 (41)
14: 1 (43)
15: 1 (47)
16: 1 (49)
17: 1 (53)
18: 1 (59)
19: 1 (61)
20: 1 (64)
21: 1 (67)
22: 1 (71)
23: 1 (73)
24: 1 (79)
25: 1 (81)
26: 1 (83)
27: 1 (89)
28: 1 (97)
29: 1 (101)
30: 1 (103)
31: 1 (107)
32: 1 (109)
33: 1 (113)
34: 1 (121)
35: 1 (125)
36: 2 (127 128)
37: 1 (131)
38: 1 (137)
etc.
		

Crossrefs

Programs

  • Mathematica
    With[{n = 500}, Function[s, Function[t, Length /@ DeleteCases[Split@ ReplacePart[t, Map[# -> 1 &, s]], k_ /; First@ k == 0]]@ ConstantArray[0, Max@ s]]@ Sort@ Flatten[{{1}}~Join~Array[Function[p, Map[p^# &, Range@ Floor@ Log[p, n]] ][Prime@ #] &, PrimePi@ n]]] (* Michael De Vlieger, Jul 25 2017 *)

Extensions

Terms a(33) & a(36) corrected, more terms added by Antti Karttunen, Jul 24 2017

A025474 Exponent of the n-th prime power A000961(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 1, 1, 1, 2, 3, 1, 1, 5, 1, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 8, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of automorphisms on the field with order A000961(n). This group of automorphisms is cyclic of order a(n). - Geoffrey Critzer, Feb 23 2018

Crossrefs

Cf. A000961 (the prime powers), A025473 (prime root of these), A100995 (exponent of prime powers or 0 otherwise), A001222 (bigomega), A056798 (prime powers with even exponents).
Cf. A117331.

Programs

  • Haskell
    a025474 = a001222 . a000961 -- Reinhard Zumkeller, Aug 13 2013
    
  • Mathematica
    Prepend[Table[ FactorInteger[q][[1, 2]], {q,
    Select[Range[1, 1000], PrimeNu[#] == 1 &]}], 0] (* Geoffrey Critzer, Feb 23 2018 *)
  • PARI
    A025474_upto(N)=apply(bigomega, A000961_list(N)) \\ M. F. Hasler, Jun 16 2022
    
  • Python
    A025474_upto = lambda N: [A001222(n) for n in A000961_list(N)] # M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import prime, integer_nthroot, factorint
    def A025474(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 list(factorint(m).values())[0] # Chai Wah Wu, Aug 15 2024

Formula

a(n) = A100995(A000961(n)).
A000961(n) = A025473(n)^a(n); A056798(n) = A025473(n)^(2*a(n));
A192015(n) = a(n)*A025473(n)^(a(n)-1). - Reinhard Zumkeller, Jun 24 2011
a(n) = A001222(A000961(n)). - David Wasserman, Feb 16 2006

Extensions

Edited by M. F. Hasler, Jun 16 2022

A376596 Second differences of consecutive prime-powers inclusive (A000961). First differences of A057820.

Original entry on oeis.org

0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, -4, 1, 0, 1, -2, 4, -4, 0, 4, 2, -4, -2, 2, -2, 2, 4, -4, -2, -1, 2, 3, -4, 8, -8, 4, 0, -2, -2, 2, 2, -4, 8, -8, 2, -2, 10, 0, -8, -2, 2, 2, -4, 0, 6, -3, -4, 5, 0, -4, 4, -2, -2
Offset: 1

Views

Author

Gus Wiseman, Oct 02 2024

Keywords

Comments

For the exclusive version, shift left once.

Examples

			The prime-powers inclusive (A000961) are:
  1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, ...
with first differences (A057820):
  1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, ...
with first differences (A376596):
  0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we had A057820, sorted firsts A376340(n)+1 (except first term).
Positions of zeros are A376597, complement A376598.
Sorted positions of first appearances are A376653, exclusive A376654.
A000961 lists prime-powers inclusive, exclusive A246655.
A001597 lists perfect-powers, complement A007916.
A023893 and A023894 count integer partitions into prime-powers, factorizations A000688.
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive: A057820 (first differences), A376597 (inflections and undulations), A376598 (nonzero curvature).
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376599 (non-prime-power).

Programs

  • Mathematica
    Differences[Select[Range[1000],#==1||PrimePowerQ[#]&],2]
  • Python
    from sympy import primepi, integer_nthroot
    def A376596(n):
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return (a:=iterfun(f,n))-((b:=iterfun(lambda x:f(x)+1,a))<<1)+iterfun(lambda x:f(x)+2,b) # Chai Wah Wu, Oct 02 2024

A025473 a(1) = 1; for n > 1, a(n) = prime root of n-th prime power (A000961).

Original entry on oeis.org

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

Views

Author

David W. Wilson, Dec 11 1999

Keywords

Comments

This sequence is related to the cyclotomic sequences A013595 and A020500, leading to the procedure used in the Mathematica program. - Roger L. Bagula, Jul 08 2008
"LCM numeral system": a(n+1) is radix for index n, n >= 0; a(-n+1) is 1/radix for index n, n < 0. - Daniel Forgues, May 03 2014
This is the LCM-transform of A000961; same as A014963 with all 1's (except a(1)) removed. - David James Sycamore, Jan 11 2024

References

  • Paul J. McCarthy, Algebraic Extensions of Fields, Dover books, 1976, pages 40, 69

Crossrefs

Programs

  • Haskell
    a025473 = a020639 . a000961 -- Reinhard Zumkeller, Aug 14 2013
    
  • Maple
    cvm := proc(n, level) local f,opf; if n < 2 then RETURN() fi;
    f := ifactors(n); opf := op(1,op(2,f)); if nops(op(2,f)) > 1 or
    op(2,opf) <= level then RETURN() fi; op(1,opf) end:
    A025473_list := n -> [1,seq(cvm(i,0),i=1..n)];
    A025473_list(240); # Peter Luschny, Sep 21 2011
  • Mathematica
    a = Join[{1}, Flatten[Table[If[PrimeQ[Apply[Plus, CoefficientList[Cyclotomic[n, x], x]]], Apply[Plus, CoefficientList[Cyclotomic[n, x], x]], {}], {n, 1, 1000}]]] (* Roger L. Bagula, Jul 08 2008 *)
    Join[{1}, First@ First@# & /@ FactorInteger@ Select[Range@ 240, PrimePowerQ]] (* Robert G. Wilson v, Aug 17 2017 *)
  • PARI
    print1(1); for(n=2,1e3, if(isprimepower(n,&p), print1(", "p))) \\ Charles R Greathouse IV, Apr 28 2014
    
  • Python
    from sympy import primepi, integer_nthroot, primefactors
    def A025473(n):
        if n == 1: return 1
        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 primefactors(m)[0] # Chai Wah Wu, Aug 15 2024
  • Sage
    def A025473_list(n) :
        R = [1]
        for i in (2..n) :
            if i.is_prime_power() :
                R.append(prime_divisors(i)[0])
        return R
    A025473_list(239) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A006530(A000961(n)) = A020639(A000961(n)). - David Wasserman, Feb 16 2006
From Reinhard Zumkeller, Jun 26 2011: (Start)
A000961(n) = a(n)^A025474(n).
A056798(n) = a(n)^(2*A025474(n)).
A192015(n) = A025474(n)*a(n)^(A025474(n)-1). (End)
a(1) = A051451(1) ; for n > 1, a(n) = A051451(n)/A051451(n-1). - Peter Munn, Aug 11 2024

Extensions

Offset corrected by David Wasserman, Dec 22 2008

A373675 Sums of maximal runs of powers of primes A000961.

Original entry on oeis.org

15, 24, 11, 13, 33, 19, 23, 25, 27, 29, 63, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 255, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239
Offset: 1

Views

Author

Gus Wiseman, Jun 16 2024

Keywords

Comments

A run of a sequence (in this case A000961) is an interval of positions at which consecutive terms differ by one.

Examples

			The maximal runs of powers of primes begin:
   1   2   3   4   5
   7   8   9
  11
  13
  16  17
  19
  23
  25
  27
  29
  31  32
  37
  41
  43
  47
  49
		

Crossrefs

A000040 lists the primes, differences A001223.
A000961 lists all powers of primes (A246655 if not including 1).
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A361102 lists all non-prime-powers (A024619 if not including 1).
See link for composite, prime, nonsquarefree, and squarefree runs.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Non-prime-power runs: A373678, min A373676, max A373677, length A110969.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.
Non-prime-power antiruns: A373679, min A373575, max A255346, length A373672.

Programs

  • Mathematica
    pripow[n_]:=n==1||PrimePowerQ[n];
    Total/@Split[Select[Range[nn],pripow],#1+1==#2&]//Most

A195943 Zeroless prime powers: Intersection of A000961 and A052382.

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, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 251, 256, 257, 263, 269, 271, 277, 281, 283, 289, 293, 311
Offset: 1

Views

Author

M. F. Hasler, Sep 25 2011

Keywords

Comments

In contrast to A195942, we also allow for primes (p^n with n=1) in this sequence.

Crossrefs

Programs

  • Haskell
    a195943 n = a195943_list !! (n-1)
    a195943_list = filter ((== 1) . a010055) a052382_list
    -- Reinhard Zumkeller, Sep 27 2011
  • PARI
    for( n=1,9999, is_A000961(n) && is_A052382(n) && print1(n","))
    

Formula

A010055(a(n)) * A168046(a(n)) = 1. - Reinhard Zumkeller, Sep 27 2011
Showing 1-10 of 1154 results. Next