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.

A373552 a(n) is the least start of a run of exactly n successive squarefree numbers (A005117) that are even, or -1 if no such run exists.

Original entry on oeis.org

2, 422, 2522, 1674274, 24697404970, 4014578863358
Offset: 1

Views

Author

Amiram Eldar, Jun 09 2024

Keywords

Examples

			a(1) = 2, since 2 is an even squarefree number, preceded by an odd squarefree number, 3, and followed by an odd squarefree number, 3.
a(2) = 422, since 422 and 426 are two successive squarefree numbers that are even, preceded by an odd squarefree number, 421, and followed by an odd squarefree number, 427.
The first 4 terms and the corresponding sets of successive squarefree numbers are:
  n |         a(n)  | The n successive squarefree numbers
  --|---------------|------------------------------------
  1 |            2  | 1
  2 |          422  | 422, 426
  3 |         2522  | 2522, 2526, 2530
  4 |      1674274  | 1674274, 1674278, 1674282, 1674286
		

Crossrefs

Programs

  • Mathematica
    seq[lim_] := Module[{sqf = Select[Range[lim], SquareFreeQ], s = {}, rem, ind}, rem = Join[{1}, Mod[sqf, 2]]; Do[ind = SequencePosition[rem, Join[{1}, Table[0, {k}], {1}], 1]; If[ind == {}, Break[]]; AppendTo[s, sqf[[ind[[1, 1]]]]], {k, 1, Infinity}]; s]; seq[2*10^6]
  • PARI
    lista(len, kmax = oo) = {my(v = vector(len), c = 0, k = 1, k0, i = 0); while(c < len && k < kmax, if(issquarefree(k), if(!(k % 2), i++; if(i == 1, k0 = k), if(i > 0 && i <= len && v[i] == 0, v[i] = k0; c++); i = 0)); k++); v;}

Extensions

a(6) from Bert Dobbelaere, Jun 14 2024