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

A246551 Prime powers p^e where p is a prime and e is odd.

Original entry on oeis.org

2, 3, 5, 7, 8, 11, 13, 17, 19, 23, 27, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313
Offset: 1

Views

Author

Joerg Arndt, Aug 29 2014

Keywords

Comments

These are the integers with only one prime factor whose cototient is square, so this sequence is a subsequence of A063752. Indeed, cototient(p^(2k+1)) = (p^k)^2 and cototient(p) = 1 = 1^2. - Bernard Schott, Jan 08 2019
With 1 prepended, this sequence is the lexicographically earliest sequence of distinct numbers whose partial products are all numbers whose exponents in their prime power factorization are squares (A197680). - Amiram Eldar, Sep 24 2024

Crossrefs

Cf. A000961, A246547, A246549, A168363, A197680, subsequence of A171561.
Cf. also A056798 (prime powers with even exponents >= 0).
Subsequence of A063752.

Programs

  • Magma
    [n:n in [2..1000]| #PrimeDivisors(n) eq 1 and IsSquare(n-EulerPhi(n))]; // Marius A. Burtea, May 15 2019
    
  • Mathematica
    Take[Union[Flatten[Table[Prime[n]^(k + 1), {n, 100}, {k, 0, 14, 2}]]], 100] (* Vincenzo Librandi, Jan 10 2019 *)
  • PARI
    for(n=1, 10^4, my(e=isprimepower(n)); if(e%2==1, print1(n, ", ")))
    
  • Python
    from sympy import primepi, integer_nthroot
    def A246551(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0])for k in range(1,x.bit_length(),2)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 13 2024

A268391 Numbers of the form p^A001317(k) where p is prime and k >= 0.

Original entry on oeis.org

2, 3, 5, 7, 8, 11, 13, 17, 19, 23, 27, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Comments

Sequence A268392 sorted into ascending order.

Crossrefs

Cf. A000040 (subsequence).
Subsequence of A000961 and A246551.
Differs from A171561 and A246551 for the first time at n=36, which here a(36) = 131.

A304291 Composite numbers k such that for all primes p dividing k, p-1 divides k-1 and p+1 divides k+1.

Original entry on oeis.org

8, 27, 32, 125, 128, 243, 343, 512, 1331, 2048, 2187, 2197, 3125, 4913, 6859, 8192, 12167, 16807, 19683, 24389, 29791, 32768, 50653, 68921, 74431, 78125, 79507, 103823, 131072, 148877, 161051, 177147, 205379, 226981, 300763, 357911, 371293, 389017, 493039, 524288
Offset: 1

Views

Author

Paolo P. Lava, May 17 2018

Keywords

Comments

Intersection of A080062 and A056729.
Mainly odd powers of a prime: A056824 is a subset of this sequence.
If the additional limitations p-2|n-2 and p+2|n+2 should be added, only 243, 19683, 78125, 1594323 would be terms of the sequence for n <= 10^7.
Terms that are not perfect powers are 31*7^4, 31^3*7^4, 71*11^6, .... - Altug Alkan, May 17 2018
It appears that this is the intersection of A002808 and A171561. - Michel Marcus, May 19 2018
From Robert Israel, May 25 2018: (Start)
If i is odd and 4|j, then 31^i*7^j is a member.
If i is odd and 6|j, then 71^i*11^j is a member.
If i is odd and 12|j, then 17^i*5^j is a member.
If i is odd and 36|j, then 53^i*5^j is a member.
If i == 9 (mod 18) and 6|j, then 13^i*37^j is a member.
If i == 9 (mod 18) and 12|j, then 29^i*53^j is a member.
If i == 18 (mod 36), j == 3 (mod 6) and k == 2 (mod 4), then 5^i*17^j*53^k is a member.
(End)
Composite numbers k such that for all primes p dividing k, p+1 divides k-1 and p-1 divides k+1 are the union of 2^2j and 3^2j, with j>0. - Paolo P. Lava, May 16 2019

Examples

			Prime factors of 74431 are 7 and 31 and (74431-1)/(7-1) = 12405, (74431-1)/(31-1) = 2481, (74431+1)/(7+1) = 9304, (74431+1)/(31+1) = 2326.
		

Crossrefs

Programs

  • Magma
    sol:=[]; m:=1; p:=[]; for u in [1..600000] do if not IsPrime(u) then p:=PrimeDivisors(u);  s:=0; for i in [1..#p] do if IsIntegral((u-1)/(p[i]-1)) and  IsIntegral((u+1)/(p[i]+1)) then  s:=s+1; end if; if s eq #p then sol[m]:=u; m:=m+1; end if; end for; end if; end for; sol; // Marius A. Burtea, May 16 2019
  • Maple
    with(numtheory): P:=proc(q) local a,b,k,n,ok;
    for n from 2 to q do if not isprime(n) then a:=factorset(n); ok:=1;
    for k from 1 to nops(a) do if frac((n-1)/(a[k]-1))>0 or frac((n+1)/(a[k]+1))>0 then ok:=0; break; fi; od;
    if ok=1 then print(n); fi; fi; od; end: P(10^6);
  • Mathematica
    Select[Range[4, 2^19], Function[k, And[CompositeQ@ k, AllTrue[FactorInteger[k][[All, 1]], And[Mod[k - 1, # - 1] == 0, Mod[k + 1, # + 1] == 0] &]]]] (* Michael De Vlieger, May 22 2018 *)
  • PARI
    lista(nn) = {forcomposite(c=1, nn, my(f = factor(c)); ok = 1; for (k=1, #f~, my(p = f[k,1]); if (((c-1) % (p-1)) || ((c+1) % (p+1)), ok = 0; break);); if (ok, print1(c, ", ")););} \\ Michel Marcus, May 19 2018
    
Showing 1-3 of 3 results.