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.

A229552 Numbers k such that phi(k) = phi(k+2) - phi(k+1).

Original entry on oeis.org

1, 3, 5, 9, 15, 21, 35, 39, 45, 99, 135, 231, 255, 855, 1035, 1295, 1539, 1599, 2015, 4335, 6525, 9177, 14399, 16095, 30495, 55385, 61131, 62799, 65535, 72579, 77615, 110175, 152649, 179295, 244965, 299649, 603459, 619695, 686735, 1876725, 2841915, 3058209
Offset: 1

Views

Author

Vincenzo Librandi, Sep 27 2013

Keywords

Crossrefs

Programs

Formula

a(n) = A065557(n) - 2. - Amiram Eldar, Dec 09 2022

A250222 a(n) = phi(2n+1) - phi(2n), where phi is A000010.

Original entry on oeis.org

1, 2, 4, 2, 6, 8, 2, 8, 12, 4, 12, 12, 6, 16, 22, 4, 8, 24, 6, 24, 30, 4, 24, 26, 12, 28, 22, 12, 30, 44, 6, 16, 46, 12, 46, 48, 4, 24, 54, 22, 42, 40, 14, 48, 48, 16, 26, 64, 18, 60, 70, 0, 54, 72, 32, 64, 52, 16, 38, 78, 20, 40, 90, 20, 82, 68, 6, 72, 94, 44, 50, 64
Offset: 1

Views

Author

Eric Chen, Dec 24 2014

Keywords

Comments

a(157) = -12 is the first negative number in this sequence.

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[2*n+1] - EulerPhi[2*n]; Array[a, 100] (* Amiram Eldar, Nov 09 2024 *)
    #[[2]]-#[[1]]&/@Partition[EulerPhi[Range[2,150]],2] (* Harvey P. Dale, Aug 02 2025 *)
  • PARI
    a(n) = eulerphi(2*n+1) - eulerphi(2*n); \\ Amiram Eldar, Nov 09 2024

Formula

From Amiram Eldar, Nov 09 2024: (Start)
a(n) = A057000(2*n).
a(n) = A037225(n) - A062570(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = 4/Pi^2 = 0.405284... (A185199). (End)

A331573 The bottom entry in the forward difference table of the Euler totient function phi for 1..n.

Original entry on oeis.org

1, 0, 1, -2, 5, -14, 39, -102, 247, -558, 1197, -2494, 5167, -10850, 23311, -51132, 113333, -250694, 547871, -1175998, 2475153, -5117486, 10439895, -21142030, 42777735, -86960284, 178221401, -368541508, 767762191, -1606535062, 3365499467, -7038925364, 14671422797, -30450115592
Offset: 1

Views

Author

Robert G. Wilson v, Jan 20 2020

Keywords

Comments

a(2n) is a nonpositive even number while a(2n-1) is an odd positive number.
Abs(a(n)) < abs(a(n+1)) for 1 < n < 8000.

Examples

			a(8) = -102 because:
1     1     2     2     4     2     6     4  (first 8 terms of A000010)
   0     1     0     2    -2     4    -2     (first 7 terms of A057000)
      1    -1     2    -4     6     6
        -2     3    -6    10   -12
            5    -9    16   -22
             -14    25   -38
                 39   -63
                  -102
The first principal right descending diagonal is this sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Differences[ Array[ EulerPhi, n], n -1][[1]]; Array[f, 34] (* or *)
    nmx = 34; Join[ {1}, Differences[ Array[ EulerPhi, nmx], #][[1]] & /@ Range[nmx - 1]]

Formula

a(n) = Sum_{k=1..n} (-1)^(n-k)*binomial(n-1,k-1)*phi(k). - Ridouane Oudra, Aug 21 2021
a(n) = Sum_{k=1..n} (-1)^(n-k)*binomial(n,k)*A002088(k). - Ridouane Oudra, Oct 02 2022

A362913 Array of numbers read by upward antidiagonals: leading row lists phi(i), i >= 1 (cf. A000010); the following rows give absolute values of differences of previous row.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 0, 1, 0, 2, 1, 1, 2, 2, 4, 0, 1, 2, 0, 2, 2, 1, 1, 0, 2, 2, 4, 6, 0, 1, 2, 2, 0, 2, 2, 4, 1, 1, 2, 0, 2, 2, 0, 2, 6, 0, 1, 2, 0, 0, 2, 0, 0, 2, 4, 1, 1, 0, 2, 2, 2, 4, 4, 4, 6, 10, 0, 1, 2, 2, 0, 2, 4, 0, 4, 0, 6, 4, 1, 1, 0, 2, 0, 0, 2, 2, 2, 2, 2, 8, 12, 0, 1, 2, 2
Offset: 1

Views

Author

N. J. A. Sloane, May 09 2023

Keywords

Comments

The leading entries in the rows (the Gilbreath transform of A000010, cf. A362451) appear to form the period-2 sequence 1,0,1,0,1,0,... Is there a simple proof? This would follow if there was a proof that the Gilbreath transform of |A057000| is the all-1's sequence.

Examples

			The array begins:
  1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, ...
  0, 1, 0, 2, 2, 4, 2, 2, 2, 6, 6, 8, 6, 2, 0, ...
  1, 1, 2, 0, 2, 2, 0, 0, 4, 0, 2, 2, 4, 2, ...
  0, 1, 2, 2, 0, 2, 0, 4, 4, 2, 0, 2, 2, ...
  1, 1, 0, 2, 2, 2, 4, 0, 2, 2, 2, 0, ...
  0, 1, 2, 0, 0, 2, 4, 2, 0, 0, 2, ...
  1, 1, 2, 0, 2, 2, 2, 2, 0, 2, ...
  0, 1, 2, 2, 0, 0, 0, 2, 2, ...
  1, 1, 0, 2, 0, 0, 2, 0, ...
  ...
The first few antidiagonals are:
  1
  0, 1
  1, 1, 2
  0, 1, 0, 2
  1, 1, 2, 2, 4
  0, 1, 2, 0, 2, 2
  1, 1, 0, 2, 2, 4, 6
  0, 1, 2, 2, 0, 2, 2, 4
  1, 1, 2, 0, 2, 2, 0, 2, 6
  0, 1, 2, 0, 0, 2, 0, 0, 2, 4
  ...
		

Crossrefs

Cf. A000010 (top row of array), A057000 (signed version of second row), A362451,

Programs

  • Mathematica
    A362913[dmax_]:=With[{d=Reverse[NestList[Abs[Differences[#]]&,EulerPhi[Range[dmax]],dmax-1]]},Array[Diagonal[d,#]&,dmax,1-dmax]];A362913[20] (* Generates 20 antidiagonals *) (* Paolo Xausa, May 10 2023 *)

A295865 Numbers k, the smallest of at least 4 consecutive numbers x, for which phi(x) <= phi(x+1).

Original entry on oeis.org

1, 2, 14, 104, 164, 254, 494, 584, 1484, 2204, 2534, 2834, 3002, 3674, 3926, 4454, 4484, 4784, 4844, 5186, 5264, 5312, 5984, 6104, 7994, 8294, 8414, 8774, 8834, 9074, 9164, 9944, 10004, 10604, 10724, 11024, 11684, 11894, 12254, 13034, 13064, 13166, 13364, 13454, 13754, 14234, 15344, 15554, 16184, 16214
Offset: 1

Views

Author

Torlach Rush, Feb 13 2018

Keywords

Comments

There are 3988536 terms below 2*10^9.
Up to a(3988356):
- a(1) is the only odd term.
- a(1) is the only term with 5 consecutive numbers where phi(k) <= phi(k+1).
- the only powers of 2 are a(1)=1 and a(2) = 2.
- of the residues of a(n) mod 10, 4 accounts for greater than 91%.
- if a(n) is divisible by 4, then phi(a(n)) is divisible by 4.
Numbers k such that A057000(k) >= 0 for 3 consecutive terms. - Michel Marcus, Mar 21 2018

Examples

			14 is a term because phi(14) <= phi(15) <= phi(16) <= phi(17).
15 is not a term because phi(15) <= phi(16) <= phi(17) > phi(18).
		

Crossrefs

Programs

  • Maple
    Phi:= map(numtheory:-phi, [$1..20001]):
    DPhi:= Phi[2..-1]-Phi[1..-2]:
    C:= select(t -> DPhi[t]>=0, [$1..20000]):
    C[select(t -> C[t+2]=C[t]+2, [$1..nops(C)-3])]; # Robert Israel, Mar 26 2018
  • Mathematica
    Drop[#, -2] & /@ Select[SplitBy[#, Last@ # >= 0 &], Length@ # > 2 && #[[1, -1]] >= 0 &][[All, All, 1]] &@ MapIndexed[{First@ #2, #1} &, Differences@ Array[EulerPhi, 2^14]] // Flatten (* Michael De Vlieger, Mar 26 2018 *)
  • PARI
    isok(n) = {my(v = vector(4, k, eulerphi(n+k-1))); (v[1] <= v[2]) && (v[2] <= v[3]) && (v[3] <= v[4]);} \\ Michel Marcus, Mar 21 2018
Showing 1-5 of 5 results.