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-3 of 3 results.

A073248 Squarefree numbers k such that k+1 is also squarefree, but k-1 and k+2 are not.

Original entry on oeis.org

10, 46, 61, 73, 82, 118, 122, 133, 145, 154, 173, 190, 205, 226, 246, 262, 273, 277, 290, 298, 313, 326, 334, 370, 373, 385, 406, 421, 426, 442, 457, 473, 478, 493, 505, 514, 526, 537, 565, 573, 586, 601, 606, 622, 626, 658, 673, 694, 709, 730, 733, 745
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Crossrefs

Programs

  • Maple
    state:= [true,true,true,true]:
    R:= NULL: count:= 0:
    for n from 1 while count < 100 do
      state:= [state[2],state[3],state[4],numtheory:-issqrfree(n)];
      if state = [false,true,true,false] then
         R:= R, n-2; count:= count+1
      fi
    od:
    R; # Robert Israel, Mar 02 2022
  • Mathematica
    Transpose[SequencePosition[Table[If[SquareFreeQ[n],1,0],{n,800}],{0,1,1,0}]][[1]]+1 (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Mar 09 2016 *)

A073249 Nonprime squarefree numbers n such that both n-1 and n+1 are not squarefree and not prime.

Original entry on oeis.org

26, 51, 55, 91, 161, 170, 235, 249, 295, 305, 339, 341, 362, 377, 413, 415, 451, 485, 489, 530, 551, 559, 579, 595, 629, 638, 649, 651, 665, 667, 685, 687, 703, 721, 723, 737, 749, 849, 851, 874, 917, 926, 949, 951, 955, 962, 989, 1015, 1027, 1057, 1059
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Crossrefs

Programs

  • Mathematica
    npsQ[n_]:=SquareFreeQ[n]&&NoneTrue[n+{1,0,-1},PrimeQ]&&NoneTrue[n+{1,-1},SquareFreeQ]; Select[Range[2000],npsQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jan 20 2019 *)
    Mean/@SequencePosition[Table[Which[CompositeQ[n]&&SquareFreeQ[n],1,!SquareFreeQ[ n] && CompositeQ[ n],-1,True,0],{n,1100}],{-1,1,-1}] (* Harvey P. Dale, Jun 17 2022 *)

Extensions

Corrected by Harvey P. Dale, Jan 20 2019

A073251 Numbers k such that k, k+1 and k+2 are nonprime and squarefree.

Original entry on oeis.org

33, 85, 93, 141, 185, 201, 213, 217, 253, 265, 285, 301, 321, 393, 445, 453, 469, 481, 517, 533, 553, 581, 589, 609, 633, 669, 697, 705, 713, 753, 777, 789, 793, 805, 813, 869, 893, 897, 901, 913, 921, 933, 957, 985, 993, 1001, 1005, 1041, 1045, 1065, 1113
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Comments

k-1 and k+3 are not squarefree. Proof: k is odd, otherwise k or k+2 would be divisible by 4. Thus k+1 is even and not divisible by 4, hence k-1 and k+3 are divisible by 4.

Crossrefs

Programs

  • Mathematica
    f[upto_]:=Module[{pp=PrimePi[upto],n},lst=Partition[Complement[Range[upto], Prime[Range[pp]]],3,1];Transpose[Select[lst,And@@SquareFreeQ/@#&]][[1]]]; f[1200] (* Harvey P. Dale, Mar 21 2011 *)
  • PARI
    isok1(k) = !isprime(k) && issquarefree(k); \\ A000469
    isok(k) = isok1(k) && isok1(k+1) && isok1(k+2); \\ Michel Marcus, Mar 25 2021

Extensions

Edited by Klaus Brockhaus, Aug 07 2006
Showing 1-3 of 3 results.