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

A374066 a(n) is the number of terms in the trajectory when the map x -> A067240(x) is iterated, starting from x = n until x = 0.

Original entry on oeis.org

2, 3, 4, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 7, 6, 6, 7, 7, 8, 6, 6, 8, 9, 6, 7, 7, 8, 6, 7, 7, 8, 7, 6, 8, 7, 6, 7, 9, 8, 6, 7, 7, 8, 6, 7, 10, 11, 7, 8, 7, 8, 8, 9, 9, 8, 7, 7, 8, 9, 6, 7, 9, 6, 8, 7, 7, 8, 8, 7, 8, 9, 7, 8, 8, 9, 7, 7, 7, 8, 6, 10, 8, 9, 7, 7, 9, 8, 8, 9
Offset: 1

Views

Author

Rafik Khalfi, Jun 27 2024

Keywords

Examples

			For n=11, the trajectory from n down to 0 comprises a(11) = 7 terms: 11 -> 10 -> 5 -> 4 -> 2 -> 1 -> 0.
		

Crossrefs

Programs

  • Maple
    f := proc(n)
        local e, j:
        e := ifactors(n)[2]:
        add((e[j][1] - 1) * e[j][1]^(e[j][2] - 1), j = 1 .. nops(e))
    end proc:
     A374066:= proc(n)
        local count, current:
        count := 1:
        current := n:
        while current <> 0 do
            current := f(current):
            count := count + 1
        end do:
        return count
    end proc:
    map(A374066, [$1..200]);
  • Mathematica
    f[p_, e_] := (p - 1)*p^(e - 1); s[n_] := s[n] = Plus @@ f @@@ FactorInteger[n]; a[n_] := Length[NestWhileList[s, n, # > 0 &]]; Array[a, 100] (* Amiram Eldar, Jun 27 2024 *)

A080737 a(1) = a(2) = 0; for n > 2, the least dimension of a lattice possessing a symmetry of order n.

Original entry on oeis.org

0, 0, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 6, 8, 16, 6, 18, 6, 8, 10, 22, 6, 20, 12, 18, 8, 28, 6, 30, 16, 12, 16, 10, 8, 36, 18, 14, 8, 40, 8, 42, 12, 10, 22, 46, 10, 42, 20, 18, 14, 52, 18, 14, 10, 20, 28, 58, 8, 60, 30, 12, 32, 16, 12, 66, 18, 24, 10, 70, 10, 72, 36, 22, 20, 16, 14
Offset: 1

Views

Author

N. J. A. Sloane, Mar 08 2003

Keywords

Crossrefs

See A152455 for another version.

Programs

  • Haskell
    a080737 n = a080737_list !! (n-1)
    a080737_list = 0 : (map f [2..]) where
    f n | mod n 4 == 2 = a080737 $ div n 2
    | otherwise = a067240 n
    -- Reinhard Zumkeller, Jun 13 2012, Jun 11 2012
  • Mathematica
    a[1] = a[2] = 0; a[p_?PrimeQ] := a[p] = p-1; a[n_] := a[n] = If[Length[fi = FactorInteger[n]] == 1, EulerPhi[n], Total[a /@ (fi[[All, 1]]^fi[[All, 2]])]]; Table[a[n], {n, 1, 78}] (* Jean-François Alcover, Jun 20 2012 *)
  • PARI
    for(n=1,78,k=0; if(n>1,f=factor(n); k=sum(j=1,matsize(f)[1],eulerphi(f[j,1]^f[j,2])); if(f[1,1]==2&&f[1,2]==1,k--)); print1(k,",")) \\ Klaus Brockhaus, Mar 10 2003
    

Formula

For n > 2, a(2^r) = 2^(r-1) with r>1, a(p^r) = phi(p^r) with p > 2 prime, r >= 1, where phi is Euler's function A000010; in general if a(Product p_i^e_i) = Sum a(p_i^e_i).

Extensions

More terms from Klaus Brockhaus, Mar 10 2003

A005417 Maximal period of an n-stage shift register.

Original entry on oeis.org

2, 6, 12, 30, 60, 120, 210, 420, 840, 1260, 2520, 2520, 5040, 9240, 13860, 27720, 32760, 55440, 65520, 120120, 180180, 360360, 360360, 720720, 720720, 942480, 1113840
Offset: 0

Views

Author

Keywords

Comments

Maximal order of an element of finite order in GL(2n, Z) or GL(2n+1, Z).
a(n) is the max of the first n numbers in A080742.

References

  • H. Lüneburg, Galoisfelder, Kreisteilungskörper und Schieberegisterfolgen. B. I. Wissenschaftsverlag, Mannheim, 1979.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    (* b,c = a080737 *)
    nmax = 26;
    kmax = 1200000; (* kmax increased by 100000 until results do not change *)
    b[1] = b[2] = 0; b[p_?PrimeQ] := b[p] = p-1; b[k_] := b[k] = If[Length[f = FactorInteger[k]]==1, EulerPhi[k], Total[b /@ (f[[All, 1]]^f[[All, 2]])] ];
    orders = Table[{k, b[k]}, {k, 1, kmax}];
    c[0] = 2; c[n_] := c[n] = Select[orders, 2n-1 <= #[[2]] <= 2n&][[-1, 1]];
    a[n_] := Table[c[m], {m, 0, n}] // Max;
    Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Dec 17 2017 *)

Formula

a(n) = max m such that A067240(m) <= 2n + 1. E.g., a(2) = 12 since 12 is largest m such that A067240(m) <= 5.

Extensions

Entry revised by N. J. A. Sloane, Mar 10 2002

A171453 a(n) = sum_i p_i^(e_i-1) where n = product_i p_i^e_i is the prime number decomposition of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 3, 1, 2, 2, 8, 1, 4, 1, 3, 2, 2, 1, 5, 5, 2, 9, 3, 1, 3, 1, 16, 2, 2, 2, 5, 1, 2, 2, 5, 1, 3, 1, 3, 4, 2, 1, 9, 7, 6, 2, 3, 1, 10, 2, 5, 2, 2, 1, 4, 1, 2, 4, 32, 2, 3, 1, 3, 2, 3, 1, 7, 1, 2, 6, 3, 2, 3, 1, 9, 27, 2, 1, 4, 2, 2, 2, 5, 1, 5, 2, 3, 2, 2, 2, 17, 1, 8, 4, 7
Offset: 1

Views

Author

R. J. Mathar, Dec 09 2009

Keywords

Crossrefs

Programs

  • Maple
    A171453 := proc(n) add( op(1,f)^(op(2,f)-1),f =ifactors(n)[2]) ; end proc:
    seq(A171453(n),n=1..100) ;
  • PARI
    A171453(n) = { my(f=factor(n)); vecsum(vector(#f~,i,f[i,1]^(f[i,2]-1))); }; \\ Antti Karttunen, Sep 24 2017
    
  • Python
    from sympy import factorint
    def A171453(n): return sum(p**(e-1) for p,e in factorint(n).items()) # Chai Wah Wu, Jul 01 2024

Formula

a(n) = A008475(n) - A067240(n).

A333698 G.f.: Sum_{k>=1} phi(k) * x^prime(k) / (1 - x^prime(k)).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 1, 1, 3, 4, 2, 2, 3, 3, 1, 6, 2, 4, 3, 3, 5, 6, 2, 2, 3, 1, 3, 4, 4, 10, 1, 5, 7, 4, 2, 4, 5, 3, 3, 12, 4, 6, 5, 3, 7, 8, 2, 2, 3, 7, 3, 8, 2, 6, 3, 5, 5, 16, 4, 6, 11, 3, 1, 4, 6, 18, 7, 7, 5, 8, 2, 12, 5, 3, 5, 6, 4, 10, 3, 1, 13, 22, 4, 8
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 02 2020

Keywords

Examples

			a(63) = a(3^2 * 7) = a(prime(2)^2 * prime(4)) = A000010(2) + A000010(4) = 1 + 2 = 3.
		

Crossrefs

Programs

  • Mathematica
    nmax = 85; CoefficientList[Series[Sum[EulerPhi[k] x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    a[n_] := Plus @@ (EulerPhi[PrimePi[#[[1]]]] & /@ FactorInteger[n]); Table[a[n], {n, 85}]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, eulerphi(primepi(f[k,1]))); \\ Michel Marcus, Apr 03 2020

Formula

If n = Product (p_j^k_j) then a(n) = Sum (phi(pi(p_j))).
Showing 1-5 of 5 results.