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

A340324 Numbers k such that starting with k and repeatedly applying the map x -> A340323(x) reaches the loop {3, 4}.

Original entry on oeis.org

2, 3, 4, 7, 8, 9, 16, 21, 27, 31, 32, 63, 64, 81, 93, 127, 128, 189, 217, 243, 256, 279, 381, 512, 567, 651, 729, 837, 889, 1024, 1143, 1701, 1953, 2048, 2187, 2511, 2667, 3429, 3937, 4096, 5103, 5859, 6561, 7533, 8001, 8191, 8192, 10287, 11811, 15309, 16384
Offset: 1

Views

Author

Keywords

Comments

From Sebastian Karlsson, Jan 15 2021: (Start)
The sequence can be defined exclusively as:
- Powers of two greater than one.
- Powers of three greater than one.
- Products of distinct Mersenne primes (A046528, except initial 1) or powers of three multiplied with products of distinct Mersenne primes. (End)

Crossrefs

Programs

  • Mathematica
    fa[n_]:=fa[n]=FactorInteger[n]; phi[1]=1; phi[p_, s_]:= (p + 1)*( p - 1)^(s - 1)
    phi[n_]:=Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}];
    S[n_] := NestWhile [phi, n, ! ( # == 12 || # == 3 || # == 4) &];
    Select[1 + Range[100], 2
    				
  • PARI
    f(n) = if(1==n, n, my(f=factor(n)); prod(i=1, #f~, (f[i, 1]+1)*((f[i, 1]-1)^(f[i, 2]-1)))); \\ A340323
    isok(m) = if (m==1, return(0)); while(! ((m==3) || (m==4) || (m==12)), m = f(m)); ((m==3) || (m==4)); \\ Michel Marcus, Jan 21 2021

A340325 Numbers k such that starting with k and repeatedly applying the map x -> A340323(x) reaches the fixed point 12.

Original entry on oeis.org

5, 6, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84
Offset: 1

Views

Author

Keywords

Comments

From Sebastian Karlsson, Jan 15 2021: (Start)
The sequence contains no powers of two. If a number isn't a power of two, then it is in this sequence if and only if either of the following conditions hold:
- It is a multiple of a prime that is not a Mersenne prime.
- It is divisible by the square of a Mersenne prime greater than 3. (End)

Crossrefs

Programs

  • Mathematica
    fa[n_]:=fa[n]=FactorInteger[n];phi[1]=1; phi[p_, s_]:= (p + 1)*( p - 1)^(s - 1)
    phi[n_]:=Product[phi[fa[n][[i, 1]], fa[n][[i, 2]]], {i, Length[fa[n]]}];
    S[n_] := NestWhile [phi, n, ! ( # == 12 || # == 3 || # == 4) &];
    Select[1 + Range[100], S[#] == 12 &]
  • PARI
    f(n) = if(1==n, n, my(f=factor(n)); prod(i=1, #f~, (f[i, 1]+1)*((f[i, 1]-1)^(f[i, 2]-1)))); \\ A340323
    isok(m) = if (m==1, return(0)); while(! ((m==3) || (m==4) || (m==12)), m = f(m)); (m==12); \\ Michel Marcus, Jan 21 2021

A167344 Totally multiplicative sequence with a(p) = (p-1)*(p+1) = p^2-1 for prime p.

Original entry on oeis.org

1, 3, 8, 9, 24, 24, 48, 27, 64, 72, 120, 72, 168, 144, 192, 81, 288, 192, 360, 216, 384, 360, 528, 216, 576, 504, 512, 432, 840, 576, 960, 243, 960, 864, 1152, 576, 1368, 1080, 1344, 648, 1680, 1152, 1848, 1080, 1536, 1584, 2208, 648, 2304, 1728
Offset: 1

Views

Author

Jaroslav Krizek, Nov 01 2009

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] - 1)^fi[[All, 2]])); b[1] = 1; b[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] + 1)^fi[[All, 2]])); Table[a[n]*b[n], {n, 1, 100}] (* G. C. Greubel, Jun 10 2016 *)
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = f[k,1]^2-1); factorback(f); \\ Michel Marcus, Jan 31 2021

Formula

Multiplicative with a(p^e) = ((p-1)*(p+1))^e. If n = Product p(k)^e(k) then a(n) = Product ((p(k)-1)*(p(k)+1))^e(k).
a(n) = A003958(n) * A003959(n).
Sum_{k>=1} 1/a(k) = Product_{primes p} (1 + 1/(p^2 - 2)) = 1.884261780923861906728291280746835210118330549695678826316037127832097567... - Vaclav Kotesovec, Sep 20 2020
a(n) = A340323(n) * A340368(n). - Antti Karttunen, Jan 31 2021
Sum_{k=1..n} a(k) ~ c * n^3, where c = (1/3) * Product_{p prime} (1 - 1/(p^3 - p^2 + 1)) = 0.2487962948... . - Amiram Eldar, Nov 12 2022

A340368 Multiplicative with a(p^e) = (p - 1) * (p + 1)^(e-1).

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 6, 9, 8, 4, 10, 6, 12, 6, 8, 27, 16, 8, 18, 12, 12, 10, 22, 18, 24, 12, 32, 18, 28, 8, 30, 81, 20, 16, 24, 24, 36, 18, 24, 36, 40, 12, 42, 30, 32, 22, 46, 54, 48, 24, 32, 36, 52, 32, 40, 54, 36, 28, 58, 24, 60, 30, 48, 243, 48, 20, 66, 48, 44, 24, 70, 72, 72, 36, 48, 54, 60, 24, 78, 108, 128, 40
Offset: 1

Views

Author

Antti Karttunen, Jan 06 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (p - 1)*(p + 1)^(e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 12 2022 *)
  • PARI
    A340368(n) = if(1==n,n,my(f=factor(n)); prod(i=1,#f~,(f[i,1]-1)*((f[i,1]+1)^(f[i,2]-1))));

Formula

a(n) = A167344(n) / A340323(n).
a(n) = A173557(n) * A327564(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (1 - 3/p^2 + 2/p^4) / Product_{p prime} (1 - 2/p^2 - 1/p^3) = 0.4313799748... . - Amiram Eldar, Nov 12 2022
Showing 1-4 of 4 results.