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.

A122254 Numbers with 3-smooth Euler's totient (A000010).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 26, 27, 28, 30, 32, 34, 35, 36, 37, 38, 39, 40, 42, 45, 48, 51, 52, 54, 56, 57, 60, 63, 64, 65, 68, 70, 72, 73, 74, 76, 78, 80, 81, 84, 85, 90, 91, 95, 96, 97, 102, 104, 105, 108, 109, 111, 112, 114
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 29 2006

Keywords

Comments

An integer n>=3 belongs to this sequence if and only if a regular n-gon can be constructed using straightedge and conic sections (details in Gibbins and Smolinsky, see below). - Austin Shapiro, Nov 14 2021
Products of 3-smooth numbers (A003586) and squarefree numbers whose prime factors are all Pierpont primes (A005109). - Amiram Eldar, Dec 03 2022

Crossrefs

Cf. A000010, A003586 (3-smooth), A005109.
Subsequence of A122260.

Programs

  • Mathematica
    Select[Range@115, Max[FactorInteger[EulerPhi[#]][[All, 1]]] < 5 &] (* Ivan Neretin, Jul 28 2015 *)
  • PARI
    is(n)=n=eulerphi(n);n>>=valuation(n,2);n==3^valuation(n,3) \\ Charles R Greathouse IV, Feb 21 2013
    
  • PARI
    list(lim)=my(v=List(),u,t);for(i=0,log(lim--+1.5)\log(3),t=3^i;while(t<=lim,if(isprime(t+1),listput(v,t+1));t<<=1));v=vecsort(Vec(v));u=List([1]);for(i=3,#v,for(j=1,#u,t=v[i]*u[j];if(t>lim,next(2));listput(u,t)));u=vecsort(Vec(u));v=List(u);for(i=1,#u,t=u[i];while((t*=3)<=lim,listput(v,t)));u=Vec(v);v=List(u);for(i=1,#u,t=u[i];while((t<<=1)<=lim,listput(v,t)));vecsort(Vec(v)) \\ Charles R Greathouse IV, Feb 22 2013
    
  • Python
    from itertools import count, islice
    from sympy import multiplicity, factorint
    def A065333(n): return int(3**(multiplicity(3,m:=n>>(~n&n-1).bit_length()))==m)
    def A122254_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:all(p<=3 or (e==1 and A065333(p-1)) for p,e in factorint(n).items()), count(max(startvalue,1)))
    A122254_list = list(islice(A122254_gen(),40)) # Chai Wah Wu, Dec 20 2024

Formula

a(n) = A048135(n-2) for n>2.
a(n) = A122260(n) = A048737(n) for n < 22.
Sum_{n>=1} 1/a(n) = 3 * Product_{p > 3 in A005109} (1 + 1/p) = 5.38288865867495675807... . - Amiram Eldar, Dec 03 2022