A028496 Erroneous version of A152455.
1, 2, 2, 4, 2, 6, 4, 6, 4, 12, 4, 12
Offset: 2
Keywords
References
- J. E. Goodman and J. O'Rourke, editors, Handbook of Discrete and Computational Geometry, CRC Press, 1997, p. 935.
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.
G.f. = x + x^2 + 2*x^3 + 2*x^4 + 4*x^5 + 2*x^6 + 6*x^7 + 4*x^8 + 6*x^9 + 4*x^10 + ... a(8) = 4 with {1, 3, 5, 7} units modulo 8. a(10) = 4 with {1, 3, 7, 9} units modulo 10. - _Michael Somos_, Aug 27 2013 From _Eduard I. Vatutin_, Nov 01 2020: (Start) The a(5)=4 cyclic Latin squares with the first row in ascending order are: 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 1 2 3 4 0 2 3 4 0 1 3 4 0 1 2 4 0 1 2 3 2 3 4 0 1 4 0 1 2 3 1 2 3 4 0 3 4 0 1 2 3 4 0 1 2 1 2 3 4 0 4 0 1 2 3 2 3 4 0 1 4 0 1 2 3 3 4 0 1 2 2 3 4 0 1 1 2 3 4 0 (End)
[eulerPhi(n) for n in 1..100]
a n = length (filter (==1) (map (gcd n) [1..n])) -- Allan C. Wechsler, Dec 29 2014
# Computes the first N terms of the sequence. function A000010List(N) phi = [i for i in 1:N + 1] for i in 2:N + 1 if phi[i] == i for j in i:i:N + 1 phi[j] -= div(phi[j], i) end end end return phi end println(A000010List(68)) # Peter Luschny, Sep 03 2023
[ EulerPhi(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
with(numtheory): A000010 := phi; [ seq(phi(n), n=1..100) ]; # version 1 with(numtheory): phi := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := n*mul((1-1/t1[i][1]),i=1..nops(t1)); end; # version 2 # Alternative without library function: A000010List := proc(N) local i, j, phi; phi := Array([seq(i, i = 1 .. N+1)]); for i from 2 to N + 1 do if phi[i] = i then for j from i by i to N + 1 do phi[j] := phi[j] - iquo(phi[j], i) od fi od; return phi end: A000010List(68); # Peter Luschny, Sep 03 2023
Array[EulerPhi, 70]
makelist(totient(n),n,0,1000); /* Emanuele Munarini, Mar 26 2011 */
{a(n) = if( n==0, 0, eulerphi(n))}; /* Michael Somos, Feb 05 2011 */
from sympy.ntheory import totient print([totient(i) for i in range(1, 70)]) # Indranil Ghosh, Mar 17 2017
# Note also the implementation in A365339.
def A000010(n): return euler_phi(n) # Jaap Spies, Jan 07 2007
[euler_phi(n) for n in range(1, 70)] # Zerinvary Lajos, Jun 06 2009
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
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 *)
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
Comments