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.

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