[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a132952 -id:a132952
Displaying 1-3 of 3 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A132953 a(n) is the sum of the isolated totatives of n. +10
2
0, 1, 0, 4, 0, 6, 0, 16, 0, 20, 0, 24, 0, 42, 15, 64, 0, 54, 0, 80, 21, 110, 0, 96, 0, 156, 0, 168, 0, 120, 0, 256, 33, 272, 35, 216, 0, 342, 39, 320, 0, 252, 0, 440, 135, 506, 0, 384, 0, 500, 51, 624, 0, 486, 55, 672, 57, 812, 0, 480, 0, 930, 189, 1024, 65, 660, 0, 1088, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
An isolated totative, k, of n is a positive integer which is coprime to n, is <= n and is such that neither (k-1) nor (k+1) are coprime to n.
a(2n) = phi(2n)*n, where phi(n) = A000010(n).
LINKS
FORMULA
a(n) = (n/2) * A132952(n). - Robert G. Wilson v, Sep 13 2007
EXAMPLE
The positive integers which are <= 15 and are coprime to 15 are 1,2,4,7,8,11,13,14. Of these, 1 and 2 are adjacent, 7 and 8 are adjacent and 13 and 14 are adjacent. So the isolated totatives of 15 are 4 and 11. Therefore a(15) = 4 + 11 = 15.
MATHEMATICA
fQ[k_, n_] := GCD[k, n] == 1 && GCD[k - 1, n] > 1 && GCD[k + 1, n] > 1; f[n_] := Plus @@ Select[ Rest[ Range@n - 1], fQ[ #, n] &]; Array[f, 69] (* Robert G. Wilson v *)
PROG
(PARI) A132953(n) = { my(s=0, pg=0, g=1, ng); for(k=1, n-1, if((1!=(ng=gcd(n, k+1)))&&(1==g)&&(1!=pg), s += k); pg = g; g = ng); (s); }; \\ Antti Karttunen, Nov 01 2018
CROSSREFS
Cf. A132952.
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 05 2007
EXTENSIONS
Edited and extended by Robert G. Wilson v, Sep 13 2007
STATUS
approved
A322144 a(n) = Sum_{i=1..phi(n)-1} (r(i+1)-r(i))^2 where r(1) = 1 < ... < n-1 = r(phi(n)) are the phi(n) integers relatively prime to n. +10
2
0, 0, 1, 4, 3, 16, 5, 12, 11, 24, 9, 36, 11, 32, 29, 28, 15, 56, 17, 52, 39, 48, 21, 76, 31, 56, 41, 68, 27, 128, 29, 60, 59, 72, 57, 116, 35, 80, 69, 108, 39, 168, 41, 100, 95, 96, 45, 156, 59, 136, 89, 116, 51, 176, 85, 140, 99, 120, 57, 260, 59, 128, 125, 124, 99 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
Paul Erdos, Some Unconventional Problems in Number Theory, Mathematics Magazine, Vol. 52, No. 2, Mar., 1979, pp. 67-70. See Problem 12. p. 70.
FORMULA
a(p) = p-2, for p prime.
a(k^2 * m) = k * a(k * m) + 4 * (k - 1). - David A. Corneth, Nov 28 2018
EXAMPLE
a(1) and a(2) are 0, since we have an empty sum.
For a(3), the integers < 3, coprime to 3, are 1 and 2, so a(3) = (2-1)^2 = 1.
MATHEMATICA
a[n_] := Total[Differences[Select[Range[n], GCD[n, #]==1 &]]^2]; Array[a, 50] (* Amiram Eldar, Nov 28 2018 *)
PROG
(PARI) a(n) = {v = select(x->gcd(x, n)==1, vector(n, k, k)); sum(i=1, #v-1, (v[i+1] - v[i])^2); }
(PARI) a(n) = {my(res = 0, io = 1, in = 2); while(in < n, while(gcd(in, n) > 1, in++); res += (in - io)^2; io = in; in++); res}
first(n) = {my(res = vector(n)); for(i = 1, n, c = factorback(factor(i)[, 1]); if(c == i, res[i] = a(i), res[i] = res[c] * (i / c) + 4 * (i / c - 1))); res } \\ David A. Corneth, Nov 28 2018
CROSSREFS
Cf. A000010 (phi), A038566 (rows of r).
Cf. A040976 (prime(n)-2), A132952 (isolated totatives).
KEYWORD
nonn
AUTHOR
Michel Marcus, Nov 28 2018
STATUS
approved
A322165 Numbers k that give record values for s(k)*phi(k)/k^2, where s(k) is the sum of squares of the differences between consecutive totatives of k (A322144). +10
0
1, 3, 4, 6, 10, 12, 15, 18, 20, 21, 30, 42, 60, 70, 105, 210, 385, 770, 1155, 2310, 4620, 5005, 10010, 15015, 30030, 60060, 90090, 120120, 150150, 180180, 210210, 240240, 255255, 510510 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Erdős conjectured that this ratio is bounded and offered $500 for a proof. The conjecture was proved by Montgomery and Vaughan, who won the prize.
Is this sequence infinite? If yes, what is lim_{n->oo} s(a(n))*phi(a(n))/a(n)^2?
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer, 2004, Chapter B40, Gaps between totatives, p. 146.
LINKS
Paul Erdős, The difference of consecutive primes, Duke Mathematical Journal, Vol. 6, No. 2 (1940), pp. 438-441, alternative link.
H. L. Montgomery & R. C. Vaughan, On the distribution of reduced residues, Annals of Mathematics, Vol. 123, No. 2 (1986), pp. 311-333.
EXAMPLE
The values of the ratio at the first terms of the sequence are 0, 0.222..., 0.5, 0.888..., 0.96, 1, 1.031..., ...
MATHEMATICA
ratio[n_] := Module[{v=Differences[Select[Range[n], GCD[n, #] == 1 &]]^2}, Total[v] * (Length[v]+1) / n^2]; seq={}; rm=-1; Do[r=ratio[n]; If[r>rm, rm=r; AppendTo[seq, n]], {n, 1, 1000}]; seq
PROG
(PARI) s(n) = {v = select(x->gcd(x, n)==1, vector(n, k, k)); sum(i=1, #v-1, (v[i+1] - v[i])^2); } \\ A322144
lista(nn) = {my(m = -1); for (n=1, nn, newm = s(n)*eulerphi(n)/n^2; if (newm > m, print1(n, ", "); m = newm); ); } \\ Michel Marcus, Nov 29 2018
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amiram Eldar, Nov 29 2018
STATUS
approved
page 1

Search completed in 0.009 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 15:03 EDT 2024. Contains 375517 sequences. (Running on oeis4.)