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.

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) *)

A271145 a(n) = k is the least number at which an isolated alternating run of nonsquarefree/squarefree (nsf/sf) numbers of size n starts.

Original entry on oeis.org

2, 14, 482, 6346
Offset: 0

Views

Author

Hartmut F. W. Hoft, Mar 31 2016

Keywords

Comments

A contiguous sequence of numbers satisfying the pattern sf sf nsf sf ... nsf sf nsf sf sf with k+1 nsf numbers alternating with k sf numbers that are bounded by a pair of sf numbers at both ends is called an isolated alternating nsf/sf run of size k. The left sf bounding number is the start of the run.
Any such run must start at an even number i and have an even size j, since for i odd i+3 is nsf, and for i even and j odd i+2*j+4 is nsf.
For all n>=0, a(n)+2 is divisible by 4.
a(4) > 5*10^9

Examples

			a(0) = 2 since 2, 3, 5 and 6 are sf while 4 is nsf.
a(2) = 482 since in the interval 482...494 the nsf/sf pattern is sf sf nsf sf nsf sf nsf sf nsf sf nsf sf sf and it is the first occurrence of that 13-number run.
		

Crossrefs

Programs

  • Mathematica
    nsfRun[n_] := Module[{i=n}, While[!SquareFreeQ[i], i++]; i-n]
    sfRun[n_] := Module[{i=n}, While[SquareFreeQ[i], i++]; i-n]
    sfBlockSearch[i_] := Module[{searching=True, j=i, r, s}, While[searching, r=nsfRun[j]; s=sfRun[j+r]; If[s<2, j+=r+s, searching=False]]; j+r+s]
    nsfsfPairQ[i_] := nsfRun[i]==1 && sfRun[i+1]==1
    nsfsfEndQ[i_] := nsfRun[i]==1 && sfRun[i+1]>1
    nsfsfRun[i_] := Module[{searching=True, count, j=i, s, e}, j=sfBlockSearch[j]; While[searching, count=0; s=j; While[nsfsfPairQ[j], count++; j+=2]; e=j; If[count==0 || !nsfsfEndQ[j], j=sfBlockSearch[j], searching=False]]; {s, e, count}]
    a271145[{low_, high_}, b_] := Module[{i=low, k, k3, list=Table[{}, b]}, While[i<=high, k=nsfsfRun[i]; k3=Last[k]/2; If[list[[k3]]=={}, list[[k3]]=k[[1]]-2]; i=k[[2]]]; list]
    a271145[{0, 10000}, 3] (* computes a(1), a(2), a(3) *)

A374536 a(n) is the least exponentially odd number that is nonsquarefree and is followed by exactly n successive exponentially odd numbers that are squarefree, or -1 if no such number exists.

Original entry on oeis.org

135, 24, 120, 27, 96, 88, 32, 40, 328, 168, 136, 104, 1288, 1161, 352, 488, 8, 783, 189, 952, 4520, 56, 11576, 67384, 5088, 1336, 35768, 16173, 53768, 80328, 128169, 28576, 247375, 208552, 2556192, 1486568, 3099368, 1653032, 910568, 7864008, 34242976, 14484152
Offset: 0

Views

Author

Amiram Eldar, Jul 11 2024

Keywords

Examples

			a(0) = 135 because 135 and 136 are successive nonsquarefree exponentially odd numbers with no squarefree number between them.
a(1) = 24 because 24 and 27 are successive nonsquarefree exponentially odd numbers with one squarefree number between them, 26.
a(2) = 120 because 120 and 125 are successive nonsquarefree exponentially odd numbers with two squarefree number between them, 122 and 123.
		

Crossrefs

Programs

  • Mathematica
    sq[k_] := Module[{e = FactorInteger[k][[;;, 2]]}, If[AnyTrue[e, EvenQ], 0, If[k == 1 || Max[e] == 1, 2, 1]]]; seq[len_, kmax_ : Infinity] := Module[{v = Table[0, {len}], c = 0, k = 1, k0 = 0, m, i = 1}, While[c < len && k < kmax, m = sq[k]; If[m > 0, If[m == 2, i++, If[k0 > 0, If[i <= len && v[[i]] == 0, c++; v[[i]] = k0]; i = 1];	k0 = k]]; k++]; v]; seq[10]
  • PARI
    issq(k) = {my(e = factor(k)[, 2]); for(i = 1, #e, if(!(e[i] % 2), return(0))); if(k == 1 || vecmax(e) == 1, 2, 1);}
    lista(len, kmax = oo) = {my(v = vector(len), c = 0, k = 1, k0 = 0, m, i = 1); while(c < len && k < kmax, m = issq(k); if(m > 0, if(m == 2, i++, if(k0 > 0, if(i <= len && v[i] == 0, c++; v[i] = k0); i = 1); k0 = k)); k++); v; }

Formula

a(n) = A268335(A374460(k)), where k is the least number such that A374459(k+1) - A374459(k) = n + 1.

A271041 a(n) = k is the least squarefree number with a run of zero nonsquarefree numbers immediately preceding k and a run of exactly n>=0 nonsquarefree numbers immediately succeeding k.

Original entry on oeis.org

2, 3, 7, 47, 8474, 843, 22019, 826823, 1092746, 33908367, 262315466
Offset: 0

Views

Author

Hartmut F. W. Hoft, Mar 29 2016

Keywords

Comments

This is the top row (indexed by zero) of the doubly infinite matrix T(i,j) defined in A270996: a(n) = A270996((n+1)*(n+2)/2-1).
a(11) = T(0,11) > 3*10^9.

Examples

			a(3) = 47 since 46, 47 and 51 are squarefree while 48, 49 and 50 constitute the first nonsquarefree triple after a pair of squarefree numbers.
		

Crossrefs

Programs

  • Mathematica
    (* We use function a270996[] from A270996 *)
    Map[a270996[{0, 1000000},{0, #}]&,Range[0,7]]
    (* computes a(0)...a(7) *)

A271042 a(n) = k is the least squarefree number with a run of n >= 0 nonsquarefree numbers immediately preceding k and a run of zero nonsquarefree numbers immediately succeeding k.

Original entry on oeis.org

2, 1, 10, 101, 246, 1685, 22026, 217077, 7216626, 8870033, 262315477, 221167433, 105779897634, 82462576233
Offset: 0

Views

Author

Hartmut F. W. Hoft, Mar 29 2016

Keywords

Comments

This is the leftmost column (indexed by zero) of the doubly infinite matrix T(i,j) defined in A270996: a(n) = A270996(n*(n+1)/2).

Examples

			a(3) = 101 since 97, 101 and 102 are squarefree while 98, 99 and 100 constitute the first nonsquarefree triple followed by a pair of squarefree numbers.
		

Crossrefs

Programs

  • Mathematica
    (* We use function a270996[] from A270996 *)
    Map[a270996[{0, 1000000},{#, 0}]&,Range[0,7]]
    (* computes a(0)...a(7) *)

Extensions

a(12)-a(13) from Kevin P. Thompson, Apr 19 2022
Showing 1-5 of 5 results.