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.

A083533 First difference sequence of A002202. Difference between consecutive possible values of phi(n), the Euler totient function A000010.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 2, 4, 2, 2, 2, 2, 4, 2, 4, 2, 6, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 4, 4, 6, 2, 2, 2, 4, 2, 2, 4, 4, 2, 6, 4, 2, 2, 2, 2, 4, 4, 2, 2, 4, 6, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 2, 2, 4, 6, 2, 10, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 6, 4, 2, 2, 4, 6, 4, 2, 4
Offset: 1

Views

Author

Labos Elemer, May 20 2003

Keywords

Crossrefs

Programs

  • Haskell
    a083533 n = a083533_list !! (n-1)
    a083533_list = zipWith (-) (tail a002202_list) a002202_list
    -- Reinhard Zumkeller, Nov 26 2015
    
  • Mathematica
    t=Table[EulerPhi[w], {w, 1, 25000}]; u=Union[%]; Delete[u-RotateRight[u], 1]
  • PARI
    lista(lim) = {my(k1 = 1, k2 = 1); while(k1 < lim, until(istotient(k2), k2++); print1(k2 - k1, ", "); k1 = k2);} \\ Amiram Eldar, Nov 16 2024

Formula

a(n) = A002202(n+1) - A002202(n).

A083531 First difference sequence of A002191. Differences between possible values for sum of divisors of n.

Original entry on oeis.org

2, 1, 2, 1, 1, 4, 1, 1, 1, 3, 2, 4, 4, 2, 1, 1, 4, 2, 1, 1, 2, 2, 4, 6, 2, 1, 3, 2, 1, 5, 4, 2, 4, 2, 4, 6, 1, 2, 3, 2, 4, 2, 4, 2, 2, 2, 6, 1, 3, 2, 1, 1, 4, 1, 5, 2, 4, 6, 2, 4, 2, 2, 2, 2, 4, 3, 3, 2, 4, 2, 1, 3, 6, 2, 1, 3, 2, 4, 6, 2, 4, 1, 5, 2, 4, 2, 4, 6, 2, 6, 4, 3, 1, 2, 2, 4, 2, 4, 2, 6, 2, 2, 2, 4, 6
Offset: 1

Views

Author

Labos Elemer, May 20 2003

Keywords

Examples

			8 and 12 are the 6th and 7th possible values for sigma(x), since they are sum of divisors of x = 7 and x = 11 respectively, while 9, 10, 11 are impossible ones so 12 - 8 = 4 = a(6) = A002191(7) - A002191(6).
From _Michael De Vlieger_, Jul 22 2017: (Start)
First position of values:
Value   First position
    1         2
    2         1
    3        10
    4         6
    5        30
    6        24
    7       277
    8       165
    9       509
   10       150
   11       824
   12       400
   13     10970
   14      1400
   15     10448
   16      1182
   17     18731
   18      2218
   19    209237
   20      3420
   21    127385
   22      6910
   23     28899
   24      5377
(End)
		

Crossrefs

Cf. A002191, A007609, A007369, A083532, A083533, A083534, A083535, A083536, A109323 (start of record gaps in A002191).

Programs

  • Mathematica
    t=Table[DivisorSigma[1, w], {w, 1, 25000}]; u=Union[%]; Delete[u-RotateRight[u], 1]
    (* Second program: *)
    With[{nn = 300}, Differences@ TakeWhile[Union@ DivisorSigma[1, Range@ nn], # < nn &]] (* Michael De Vlieger, Jul 22 2017 *)

A035158 Floor of the Chebyshev function theta(n): a(n) = floor(Sum_{primes p <= n } log(p)).

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 5, 5, 5, 5, 7, 7, 10, 10, 10, 10, 13, 13, 16, 16, 16, 16, 19, 19, 19, 19, 19, 19, 22, 22, 26, 26, 26, 26, 26, 26, 29, 29, 29, 29, 33, 33, 37, 37, 37, 37, 40, 40, 40, 40, 40, 40, 44, 44, 44, 44, 44, 44, 49, 49, 53, 53, 53, 53, 53, 53, 57, 57, 57, 57, 61, 61, 65, 65, 65, 65
Offset: 1

Views

Author

N. J. A. Sloane, Oct 02 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A002325.

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, see Chap. 22.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section VII.35. (For inequalities, etc.)

Crossrefs

Cf. A057872, A083535, A016040 (records), A000040 (places of records)

Programs

  • Maple
    (Maple for A035158, A057872, A083535:)
    Digits:=2000;
    tf:=[]; tr:=[]; tc:=[];
    for n from 1 to 120 do
    t2:=0;
    j:=pi(n);
    for i from 1 to j do t2:=t2+log(ithprime(i)); od;
    tf:=[op(tf),floor(evalf(t2))];
    tr:=[op(tr),round(evalf(t2))];
    tc:=[op(tc),ceil(evalf(t2))];
    od:

Formula

a(n) ~ n by the prime number theorem. - Charles R Greathouse IV, Aug 02 2012

A083534 First difference sequence of A007617. Difference between consecutive values not being in the range of phi (A000010).

Original entry on oeis.org

2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2
Offset: 1

Views

Author

Labos Elemer, May 20 2003

Keywords

Comments

a(n) is either 2 or 1 since odd numbers are in A007619.
If a(n) = 1 then A007619(n+1) is an even number not in the range of phi.

Examples

			{11,13,14,15,17} are not in the range of phi and the corresponding differences are {2,1,1,2}.
		

Crossrefs

Programs

  • Haskell
    a083534 n = a083534_list !! (n-1)
    a083534_list = zipWith (-) (tail a007617_list) a007617_list
    -- Reinhard Zumkeller, Nov 26 2015
    
  • Mathematica
    t0[x_] := Table[j, {j, 1, x}]; t=Table[EulerPhi[w], {w, 1, 10000}]; u=Union[%]; c=Complement[t0[10000], u]; Delete[c-RotateRight[c], 1]
  • PARI
    list(lim) = {my(k1 = 3, k2 = 3); while(k1 < lim, until(!istotient(k2), k2++); print1(k2 - k1, ", "); k1 = k2); } \\ Amiram Eldar, Feb 22 2025

Formula

a(n) = A007617(n+1) - A007617(n).

A252398 Successive n with minimal relative distance |1-theta(n)/n|, where theta(n) = log(A034386(n)) is Chebyshev's theta function.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 43, 47, 73, 103, 107, 109, 113, 199, 283, 467, 661, 887, 1063, 1069, 1097, 1103, 1109, 1123, 1129, 1303, 1307, 1321, 1327, 1621, 1627, 2803, 3931, 3947, 4273, 4289, 4297, 5867, 5869, 5881, 6373, 6379, 9439, 9473, 9479, 9497, 9551, 9859, 9931, 9949
Offset: 1

Views

Author

Jean-François Alcover, Dec 17 2014

Keywords

Comments

The first 10000 terms are the same as A108310 (see that sequence for comments). - Charles R Greathouse IV, Dec 18 2014
This sequence, unlike A108310, is presumably infinite; it is finite if and only if theta(n) = n for some number n.

Examples

			Given that 1 - theta(3)/3 = 1 - log(6)/3 = 0.40..., 1 - theta(4)/4 = 1 - log(6)/4 = 0.55... and 1 - theta(5)/5 = 1 - log(30)/5 = 0.31..., the next term after 3 is 5.
		

Crossrefs

Programs

  • Mathematica
    (* Adapted from PARI *) Reap[For[record = 2; theta = 0; p = 2, p < 2 * 10^8, p = NextPrime[p], theta = theta + Log[p] //N; d = Abs[1 - theta/p]; If[d < record, record = d; Print[p]; Sow[p]]]][[2, 1]]
  • PARI
    /* Note: This program may fail if you replace 1e6 with a number larger than 1e17, and will certainly fail at some point below 1e316. These large numbers are not remotely feasible at the moment. */
    r=th=0; forprime(p=2,1e6, th+=log(p); t=th/p; if(t>r, r=t; print1(p", "); if(t>1, warning("theta(n) > n, possible missed terms")))) \\ Charles R Greathouse IV, Dec 17 2014
Showing 1-5 of 5 results.