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.

A280892 Squareful numbers with both neighbors squarefree.

Original entry on oeis.org

4, 12, 16, 18, 20, 32, 36, 40, 52, 54, 56, 60, 68, 72, 84, 88, 90, 92, 96, 104, 108, 112, 128, 132, 140, 144, 150, 156, 160, 162, 164, 180, 184, 192, 196, 198, 200, 204, 212, 216, 220, 228, 232, 234, 236, 240, 248, 250, 252, 256, 264, 268, 270, 272, 284, 292, 294, 300, 304, 306, 308, 312
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 16 2017

Keywords

Comments

Subsequence of A013929 and A067874.
The asymptotic density of this sequence is Product_{p prime} (1 - 2/p^2) - Product_{p prime} (1 - 3/p^2) = 0.197147118033435... (Mossinghoff et al., 2021). - Amiram Eldar, Nov 11 2021, Mar 21 2024

Examples

			4 is in this sequence because 4 = 2^2 is nonsquarefree and both 4 - 1 = 3 and 4 + 1 = 5 are squarefree.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..300] | not IsSquarefree(n) and IsSquarefree(n-1) and IsSquarefree(n+1)];
    
  • Mathematica
    Mean/@SequencePosition[Table[If[SquareFreeQ[n],1,0],{n,400}],{1,0,1}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 19 2020 *)
  • PARI
    isok(n) = !issquarefree(n) && issquarefree(n-1) && issquarefree(n+1); \\ Michel Marcus, Jun 18 2017

Extensions

Definition corrected by Jon E. Schoenfield, Jun 18 2017

A235578 Squareful numbers with squareful neighbors.

Original entry on oeis.org

49, 99, 125, 243, 244, 343, 351, 424, 476, 549, 604, 725, 775, 845, 846, 847, 1025, 1251, 1275, 1324, 1376, 1421, 1449, 1520, 1665, 1675, 1681, 1682, 1683, 1849, 1863, 1925, 2008, 2024, 2057, 2107, 2151, 2224, 2276, 2349, 2367, 2524, 2528, 2575, 2645, 2825
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 12 2014

Keywords

Examples

			243 is in the sequence because 242 = 2 * 11^2, 243 = 3^5, 244 = 2^2 * 61.
244 is also in the sequence because 245 = 5 * 7^2.
But 245 is not in the sequence because 246 = 2 * 3 * 41.
		

Crossrefs

Subsequence of A013929.
Cf. A001694, A070258, A228649 (squarefree numbers with squarefree neighbors).

Programs

  • Mathematica
    Select[Range@3051, And @@ Not /@ SquareFreeQ /@ {#-1, #, #+1} &] (* Giovanni Resta, Jan 12 2014 *)
    Select[Range[2000], Union[MoebiusMu[{# - 1, #, # + 1}]] == {0} &] (* Alonso del Arte, Jan 12 2014 *)
  • PARI
    isok(n) = !issquarefree(n) && !issquarefree(n-1) && !issquarefree(n+1); \\ Michel Marcus, Jan 12 2014

Formula

a(n) = A070258(n) + 1. - Amiram Eldar, Feb 09 2021

Extensions

Terms corrected by Michel Marcus, Jan 12 2014

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

A361085 Least prime p > prime(n) such that at least one of p * prime(n)# +- 1 is not squarefree, where prime(n)# is the n-th primorial A002110(n).

Original entry on oeis.org

3, 5, 29, 31, 139, 167, 43, 127, 211, 41, 607, 1223, 71, 769, 1549, 947, 269, 1129, 163, 577, 673, 107, 4057, 1979, 433, 3833, 4177, 383, 1723, 409, 2399, 4517, 3803, 3061, 3299, 457, 3779, 971, 5749, 2843, 13709
Offset: 0

Views

Author

M. F. Hasler, Mar 28 2023

Keywords

Comments

It appears that a product P of distinct primes rarely has the property that P +- 1 has a square factor, and this is even more rare when P has all of the first n primes as factor. This sequence is one possible way to quantify this observation. (One could also display the gap between a(n) and prime(n), or consider b(n) the least product of distinct primes > prime(n) that yields a product with the desired property.)
See also Zumkeller's contested comment in A007018 and the discussion in the linked MathOverflow page.

Examples

			a(0) = 3 because for P = (product of the first 0 primes) = 1, p = 3 is the least prime such that p*P + 1 = 4 = 2^2 is a square; for p = 2 neither p*P - 1 = 1 nor p*P + 1 = 3 has a nontrivial square factor.
a(1) = 5 because for P = (product of the first prime) = 2, p = 5 is the least prime such that p*P - 1 = 9 = 3^2 is a square; for p = 3 none of p*P - 1 = 5 nor p*P + 1 = 7 has a nontrivial square factor.
a(2) = 29 because for P = (product of the first two primes) = 6, p = 29 is the least prime such that p*P + 1 = 5^2*7 has a square factor; for all primes 3 < p < 29 both of p*P +- 1 are squarefree.
		

Crossrefs

Cf. A002110 (factorials), A013929 (numbers that are not squarefree), A007018, A228649 (both related).

Programs

  • Mathematica
    Map[(k = 1; While[AllTrue[Prime[k] # + {-1, 1}, SquareFreeQ], k++]; Prime[k]) &, FoldList[Times, 1, Prime@ Range[24] ] ] (* Michael De Vlieger, Mar 28 2023 *)
  • PARI
    A361085(n, P=vecprod(primes(n)))=forprime(p=prime(n)+1,,(issquarefree(p*P-1)&&issquarefree(p*P+1))||return(p))

Extensions

a(30) from Michael S. Branicky, Mar 29 2023
a(31)-a(40) from Jinyuan Wang, Mar 30 2023

A361086 a(n) = a(n-1)*(a(n-1)^2 - 1) with a(0) = 2.

Original entry on oeis.org

2, 6, 210, 9260790, 794226015149981778210, 500993769952171221242360491304282624082148055373236400176882790
Offset: 0

Views

Author

M. F. Hasler, Mar 28 2023

Keywords

Comments

a(6) has 189 digits so it is not displayed here.
It appears that the sequence might be squarefree, but this is unproved so far.
If n is the least index such that p^2 | a(n+1) for some prime p, then one must have p^2 | a(n)+1 or p^2 | a(n)-1, and p >= 5.
If p is prime and p^2 | a(n) for some n, then p > 10^6. - Robert Israel, Apr 16 2023
The constant c in the formula can be obtained as exp(log(a(n))/3^n) with more than 3^n/2 significant digits. - M. F. Hasler, Apr 13 2023

Examples

			After a(0) = 2, we have:
a(1) = a(0) * 3 = 6 = A002110(2),
a(2) = a(1) * 5 * 7 = 210 = A002110(4),
a(3) = a(2) * 11 * 19 * 211 = A002110(5) * 19 * 211,
a(4) = a(3) * 23 * 137 * 2939 * 101 * 91691, (*)
a(5) = a(4) * 2381 * 4547 * 73360073674487 * 4111 * 9463 * 20415865295227, (*)
a(6) = a(5) * (a(5)-1) * (a(5)+1)  where  a(5)-1 = 8297 * 2809343 * 1697219017859557 * 12663932268383565339458540396093810087  and
  a(5)+1 = 6529 * 11220511276757421196620288973 * 6838691459094922770231096737923,
etc.
(*) We list first the prime factors of a(n-1)-1, then those of a(n-1)+1.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; procname(n-1)*(procname(n-1)-1)*(procname(n-1)+1) end proc:
    a(0):= 2:
    seq(a(i),i=0..7); # Robert Israel, Apr 16 2023
  • Mathematica
    RecurrenceTable[{a[n] == a[n-1]*(a[n-1]^2 - 1), a[0] == 2}, a, {n, 0, 6}] (* Vaclav Kotesovec, Apr 13 2023 *)
  • PARI
    A361086_first(N)=vector(N,i,N=if(i>1,N*(N^2-1),2))

Formula

a(n) ~ c^(3^n), where c = 1.8114401993215336517307679103877676944735007990106818615618948774060863424... - Vaclav Kotesovec, Apr 13 2023
Showing 1-5 of 5 results.