A076945 Duplicate of A074792.
2, 3, 4, 3, 6, 5, 8, 3, 4, 9, 12, 5, 14, 13, 16, 3, 18, 5, 20, 3, 4, 21, 24, 5, 6, 25, 4, 13, 30
Offset: 1
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.
import Data.List (elemIndices) a003277 n = a003277_list !! (n-1) a003277_list = map (+ 1) $ elemIndices 1 a009195_list -- Reinhard Zumkeller, Feb 27 2012
[n: n in [1..200] | Gcd(n, EulerPhi(n)) eq 1]; // Vincenzo Librandi, Jul 09 2015
select(t -> igcd(t, numtheory:-phi(t))=1, [$1..1000]); # Robert Israel, Jul 08 2015
Select[Range[175], GCD[#, EulerPhi[#]] == 1 &] (* Jean-François Alcover, Apr 04 2011 *) Select[Range@175, FiniteGroupCount@# == 1 &] (* Robert G. Wilson v, Feb 16 2017 *) Select[Range[200],CoprimeQ[#,EulerPhi[#]]&] (* Harvey P. Dale, Apr 10 2022 *)
isA003277(n) = gcd(n,eulerphi(n))==1 \\ Michael B. Porter, Feb 21 2010
# Compare A050384. def isPrimeTo(n, m): return gcd(n, m) == 1 def isCyclic(n): return isPrimeTo(n, euler_phi(n)) [n for n in (1..173) if isCyclic(n)] # Peter Luschny, Nov 14 2018
For n = 7, 1 + 7*a(7) = 1 + 7*299593 = 2097152 = 2^21 = 8^7. For n = 10, 1 + 10*a(10) = 1 + 10*348678440 = 3486784401 = 3^20 = 9^10. - _Marius A. Burtea_, Jun 01 2019
sol:=[]; for u in [1..20] do for k in [2..100] do if IsIntegral((k^u-1)/u) then sol[u]:=(k^u-1)/u; break; end if; end for; end for; sol; // Marius A. Burtea, Jun 01 2019
Do[k = 2; While[ !IntegerQ[(k^n - 1)/n], k++ ]; Print[(k^n - 1)/n], {n, 1, 20}] (* Robert G. Wilson v, Oct 21 2002 *)
2*(2+2)+1=3^2; 3*(3+18)+1=4^3; 4*(4+16)+1=3^4; 5*(5+1550)+1=6^5; 6*(6+2598)+1=5^6; 7*(7+299586)+1=8^7; 8*(8+812)+1=3^8; 9*(9+29118)+1=4^9; 10*(10+348678430)+1=9^10. - _R. J. Mathar_, Aug 01 2025
A083503 := proc(n) local a,b ; if n = 1 then 3 ; else for b from 2 do a := (b^n-1)/n-n ; if type( a,'integer') then return b; end if; end do: end if; end proc: seq(A083503(n),n=1..80) ; # R. J. Mathar, Aug 01 2025 # alternative: f:= proc(n) local X,S; S:= min(map(t -> subs(t,X), {msolve(X^n = 1, n)} minus {{X=1}})); if S = infinity then n+1 else S fi end proc: f(1):= 3: map(f, [$1..100]); # Robert Israel, Aug 01 2025
Do[i = 2; While[k = (i^n - 1)/n - n; !IntegerQ[k], i++ ]; Print[i], {n, 2, 81}]
A110738 := proc(n) local a ; if n = 1 then RETURN(1) ; else a := 2 ; while (1-a^n)/(1-a) mod n <> 0 do a := a+1 ; od ; RETURN(a) ; fi ; end: for n from 1 to 80 do printf("%d, ",A110738(n)) : od : # R. J. Mathar, Mar 13 2007
a(8) = gcd(A279513(8), A279513(9)) = gcd(A279513(2^3), A279513(3^2)) = gcd(2*3, 3*2) = 6.
Do[k = 2; While[ !IntegerQ[(k^n - 1)/n], k++ ]; Print[k^n], {n, 1, 19}]
a(n) = if(!(n%2)&&!issquare(Mod(-1,n)), 0, my(i=1); while(Mod(i,n)^n!=n-1, i++); i)
Comments