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.

Previous Showing 31-34 of 34 results.

A271440 a(n) = sigma(prime(n)^n) - phi(prime(n)^n).

Original entry on oeis.org

2, 7, 56, 743, 30746, 773527, 49783736, 1837403019, 160181560802, 29532404308019, 1666577516860962, 360777399719461393, 45691067858241526814, 3477439299142731351087, 518913689466371066697746, 147680787468230866751370317, 43490064769447225534580532962
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 07 2016

Keywords

Crossrefs

Cf. A000010 (phi), A000040 (primes), A000203 (sigma), A051612, A062457.

Programs

  • Maple
    with(numtheory): A271440:=n->sigma(ithprime(n)^n)-phi(ithprime(n)^n): seq(A271440(n), n=1..30);
  • Mathematica
    Table[DivisorSigma[1, Prime[n]^n] - EulerPhi[Prime[n]^n], {n, 20}]
    DivisorSigma[1,#]-EulerPhi[#]&/@Table[Prime[n]^n,{n,20}] (* Harvey P. Dale, Feb 07 2025 *)
  • PARI
    a(n) = sigma(prime(n)^n) - eulerphi(prime(n)^n); \\ Altug Alkan, Apr 08 2016

Formula

a(n) = (2*prime(n)^n-prime(n)^(n-1)-1) / (prime(n)-1).
a(n) = (prime(n)^(n+1)-prime(n)^(n-1)*(prime(n)-1)^2-1) / (prime(n)-1).
a(n) = A051612(A062457(n)) = A000203(A062457(n)) - A000010(A062457(n)).

A302172 Distance from sigma(n) to nearest multiple of phi(n).

Original entry on oeis.org

0, 0, 0, 1, 2, 0, 2, 1, 1, 2, 2, 0, 2, 0, 0, 1, 2, 3, 2, 2, 4, 4, 2, 4, 9, 6, 4, 4, 2, 0, 2, 1, 8, 6, 0, 5, 2, 6, 8, 6, 2, 0, 2, 4, 6, 6, 2, 4, 15, 7, 8, 2, 2, 6, 8, 0, 8, 6, 2, 8, 2, 6, 4, 1, 12, 4, 2, 2, 8, 0, 2, 3, 2, 6, 4, 4, 24, 0, 2, 6, 13, 6, 2, 8, 20, 6, 8, 20, 2, 6, 32, 8, 8, 6, 24, 4, 2, 3, 24, 17
Offset: 1

Views

Author

Altug Alkan, Apr 03 2018

Keywords

Comments

Numbers n such that a(n) <> A063514(n) are 8, 16, 21, 22, 25, 28, 32, 36, 40, 48, 50, 54, 55, 63, 64, 65, 68, 76, 77, 80, ...
Numbers n such that a(n) = 1 are 4, 8, 9, 16, 32, 64, 128, 256, 400, 512, 1024, 2048, 4096, 8192, 16384, ...

Examples

			a(21) = 4 because sigma(21) = 32 and phi(21) = 12; 12*3 - 32 = 4 is the smallest corresponding distance.
		

Crossrefs

Programs

  • Mathematica
    dsp[n_]:=Module[{s=DivisorSigma[1,n],p=EulerPhi[n],m},m=Floor[s/p];Abs[ Nearest[ {m*p,(m+1)p},s]-s]]; Array[dsp,100][[All,1]] (* Harvey P. Dale, Apr 29 2018 *)
  • PARI
    a(n) = {my(k=0, s=sigma(n), p=eulerphi(n)); while((s+k) % p != 0 && (s-k) % p != 0, k++); k;}

Formula

a(A020492(n)) = 0.
a(2^k) = 1 for k > 1.
a(p) = 2 for prime p > 3.

A068419 Odd prime values of sigma(k) - phi(k) taking k in increasing order.

Original entry on oeis.org

5, 11, 7, 23, 11, 47, 79, 73, 67, 23, 191, 283, 383, 739, 47, 1459, 281, 607, 59, 1153, 1069, 3319, 83, 1801, 2671, 3517, 743, 107, 6679, 3529, 6619, 6143, 6271, 4153, 10169, 9817, 167, 6451, 179, 24097, 23539, 10369, 227, 263, 16369, 41203, 20809, 54919
Offset: 1

Views

Author

Benoit Cloitre, Mar 02 2002

Keywords

Examples

			sigma(2312) - phi(2312) = 3517 is prime, so is in the sequence.
		

Crossrefs

Cf. A051612.

Programs

  • PARI
    lista(nn) = {for (k = 1, nn, if (isprime(p = (sigma(k) - eulerphi(k))) && (p % 2), print1(p, ", ")););} \\ Michel Marcus, Nov 24 2013

Extensions

Terms 3517, 10169, 9817 added by Michel Marcus, Nov 24 2013

A077103 Numbers n such that gcd(a,b) is not equal to gcd(a+b,a-b), where a=sigma(n)=A000203(n) and b=phi(n)=A000010(n).

Original entry on oeis.org

1, 2, 12, 15, 30, 39, 44, 55, 56, 76, 78, 87, 95, 99, 110, 111, 125, 140, 143, 147, 159, 171, 172, 174, 175, 183, 184, 190, 198, 215, 216, 222, 236, 247, 250, 252, 264, 268, 286, 287, 294, 295, 303, 315, 318, 319, 327, 332, 335, 336, 342, 350, 357, 363, 364
Offset: 1

Views

Author

Labos Elemer, Nov 12 2002

Keywords

Examples

			n=76: a=sigma(76)=140, b=phi(76)=36, a+b=176, a-b=104, gcd(a,b) = gcd(140,36) = 4 < gcd(a+b,a-b) = gcd(176,104) = 8.
		

Crossrefs

Programs

  • Mathematica
    Do[s=GCD[a=DivisorSigma[1, n], b=EulerPhi[n]]; s1=GCD[a+b, a-b]; If[ !Equal[s, s1], Print[{n, a, b, a+b, a-b, s, s1, s1/s}]], {n, 1, 1000}]

Formula

gcd(A000010(n), A000203(n)) is not equal to gcd(A065387(n), A051612(n)); or A055008(n) is not equal to A077099(n).
Previous Showing 31-34 of 34 results.