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.

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

A073250 Nonprime squarefree numbers n such that n+1 is also squarefree and nonprime, but not n-1 and n+2.

Original entry on oeis.org

14, 21, 38, 57, 65, 69, 77, 105, 110, 114, 118, 122, 129, 133, 145, 154, 158, 165, 177, 182, 194, 205, 209, 221, 230, 237, 246, 258, 273, 290, 298, 309, 318, 326, 329, 334, 345, 354, 357, 365, 370, 381, 385, 390, 398, 402, 406, 410, 417, 426, 429, 434, 437
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 22 2002

Keywords

Crossrefs

Programs

  • Mathematica
    tQ[n_]:=!PrimeQ[n+1]&&SquareFreeQ[n+1]&&(PrimeQ[n-1]||!SquareFreeQ[n-1])&&(PrimeQ[n+2]||!SquareFreeQ[n+2])
    Select[Select[Complement[Range[500],Prime[Range[PrimePi[500]]]],SquareFreeQ],tQ]  (* Harvey P. Dale, Feb 14 2011 *)
    SequencePosition[Table[If[SquareFreeQ[n]&&!PrimeQ[n],1,0],{n,500}],{0,1,1,0}][[;;,1]]+1 (* Harvey P. Dale, Feb 27 2023 *)

A270996 T(i, j) = k is the least squarefree number with a run of exactly i>=0 nonsquarefree numbers immediately preceding k and a run of exactly j>=0 nonsquarefree numbers immediately succeeding k.

Original entry on oeis.org

2, 1, 3, 10, 17, 7, 101, 149, 151, 47, 246, 51, 26, 97, 8474, 1685, 8479, 727, 1861, 241, 843, 22026, 849, 3178, 2526, 10826, 30247, 22019, 217077, 190453, 813251, 55779, 183553, 5045, 580847, 826823
Offset: 0

Views

Author

Hartmut F. W. Hoft, Mar 28 2016

Keywords

Comments

The sequence a(n) = T(i, j) represents the traversal of this matrix by its successive rising antidiagonals.
a(2*i*(i+1)) = A270344(i), for all i >= 0.

Examples

			a(13) = T(1, 3) = 97 since 96, 98, 99 and 100 are nonsquarefree while 95, 97, and 101 are squarefree, and 97 is the smallest number surrounded by the 1,3 pattern.
The matrix T(i, j) with first 8 complete antidiagonals together with some additional elements including the first 7 elements on the diagonal which are A270344(0)..A270344(6):
-------------------------------------------------------------------------
i\j      0       1       2       3        4         5          6        7
-------------------------------------------------------------------------
0:       2       3       7      47     8474       843      22019   826823
1:       1      17     151      97      241     30247     580847   217069
2:      10     149      26    1861    10826      5045     204322 16825126
3:     101      51     727    2526   183553   1944347   28591923 43811049
4:     246    8479    3178   55779  5876126  19375679   67806346
5:    1685     849  813251  450553 29002021   8061827 2082929927
6:   22026  190453  200854 4100277 97447622 245990821 8996188226
7:  217077  826831 7507930 90557979
T(6, 5) = 245990821, T(5, 6) = 2082929927, and all numbers in antidiagonal 11 are larger than 10^8.
		

Crossrefs

Programs

  • Mathematica
    (* The function computes the least number in the specified interval *)
    nsfRun[n_] := Module[{i=n}, While[!SquareFreeQ[i], i++]; i-n]
    a270996[{low_, high_},{widthL_, widthR_}] := Module[{i=low, r, s, first=0}, While[i<=high, r=nsfRun[i]; If[r != widthL, i+=r+1, s=nsfRun[i+r+1]; If[s != widthR, If[s != widthL, i+=r+s+2, i+=r+1], first=i+r; i=high+1]]]; first]
    a270996[{0, 5000},{2, 3}] (* computes a(18) = T(2, 3) *)
Showing 1-3 of 3 results.