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

A075432 Primes with no squarefree neighbors.

Original entry on oeis.org

17, 19, 53, 89, 97, 127, 149, 151, 163, 197, 199, 233, 241, 251, 269, 271, 293, 307, 337, 349, 379, 449, 487, 491, 521, 523, 557, 577, 593, 631, 701, 727, 739, 751, 773, 809, 811, 881, 883, 919, 953, 991, 1013, 1049, 1051, 1061, 1063, 1097, 1151, 1171, 1249
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 15 2002

Keywords

Comments

Complement of A075430 in A000040.
From Ludovicus (luiroto(AT)yahoo.com), Dec 07 2009: (Start)
I propose a shorter name: non-Euclidean primes. That is justified by the Euclid's demonstration of the infinitude of primes. It appears that the proportion of non-Euclidean primes respect to primes tend to the limit 1-2A where A = 0.37395581... is Artin's constant. This table calculated by Jens K. Andersen corroborates it:
10^5: 2421 / 9592 = 0.2523978315
10^6: 19812 / 78498 = 0.2523885958
10^7: 167489 / 664579 = 0.2520227091
10^8: 1452678 / 5761455 = 0.2521373507
10^9: 12817966 / 50847534 = 0.2520862860
10^10: 114713084 / 455052511 = 0.2520875750
10^11: 1038117249 / 4118054813 = 0.2520892256
It comes close to the expected 1-2A. (End)
This sequence is infinite by Dirichlet's theorem, since there are infinitely many primes == 17 or 19 (mod 36) and these have no squarefree neighbors. Ludovicus's conjecture about density is correct. Capsule proof: either p-1 or p+1 is divisible by 4, so it suffices to consider the other number (without loss of generality, p+1). For some fixed bound L, p is not divisible by any prime q < L (with finitely many exceptions) so there are q^2 - q possible residue classes for p. The primes in each are uniformly distributed so the probability that p+1 is divisible by q^2 is 1/(q^2 - q). The product of the complements goes to 2A as L increases without bound, and since 2A is an upper bound the limit is sandwiched between. - Charles R Greathouse IV, Aug 27 2014
Primes p such that both p-1 and p+1 are divisible by a square greater than 1. - N. J. A. Sloane, Jul 19 2024

Examples

			p = 17 is a term because 16 = 4^2 and 18=2*3^2 are divisible by squares > 1. - _N. J. A. Sloane_, Jul 19 2024
		

Crossrefs

Intersection of A000040 and A281192.

Programs

  • Haskell
    a075432 n = a075432_list !! (n-1)
    a075432_list = f [2, 4 ..] where
       f (u:vs@(v:ws)) | a008966 v == 1 = f ws
                       | a008966 u == 1 = f vs
                       | a010051' (u + 1) == 0 = f vs
                       | otherwise            = (u + 1) : f vs
    -- Reinhard Zumkeller, May 04 2013
    
  • Maple
    filter:= n -> isprime(n) and not numtheory:-issqrfree(n+1) and not numtheory:-issqrfree(n-1):
    select(filter, [seq(2*i+1, i=1..1000)]); # Robert Israel, Aug 27 2014
  • Mathematica
    lst={}; Do[p=Prime[n]; If[ !SquareFreeQ[Floor[p-1]] && !SquareFreeQ[Floor[p+1]], AppendTo[lst,p]], {n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 20 2008 *)
    Select[Prime[Range[300]],!SquareFreeQ[#-1]&&!SquareFreeQ[#+1]&] (* Harvey P. Dale, Apr 24 2014 *)
  • PARI
    is(n)=!issquarefree(if(n%4==1, n+1, n-1)) && isprime(n) \\ Charles R Greathouse IV, Aug 27 2014

Formula

a(n) ~ Cn log n, where C = 1/(1 - 2A) = 1/(1 - Product_{p>2 prime} (1 - 1/(p^2-p))), where A is the constant in A005596. - Charles R Greathouse IV, Aug 27 2014

Extensions

More terms (that were already in the b-file) from Jeppe Stig Nielsen, Apr 23 2020

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

A304720 Number of nonnegative integers k such that n - (4^k - k) is positive and squarefree.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 3, 2, 2, 1, 3, 1, 2, 1, 3, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 1, 3, 1, 2, 2, 3, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 2, 3, 2, 2, 2, 2, 3, 3, 2, 2, 3, 4, 2, 3, 3, 3, 1, 2, 2, 4, 2, 2, 3, 3, 2, 2, 3, 3, 1, 3, 2, 4, 1, 3, 2, 4, 2, 3, 2, 3
Offset: 1

Views

Author

Zhi-Wei Sun, May 17 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for n up to 2*10^10.
See A304721 for the values of n with a(n) = 1.
See A281192 for N such that none of N - 1 or N + 1 is squarefree: then n = N + 2 is such that n - 1 and n - 3 are not squarefree, i.e., one cannot take k = 0 or k = 1 in the present definition, and k > 1 is required to satisfy the conjecture. - M. F. Hasler, May 23 2018

Examples

			a(2) = 1 with 2 - (4^0 - 0) = 1 squarefree.
a(178) = 1 with 178 - (4^0 - 0) = 3*59 squarefree.
a(245) = 1 with 245 - (4^2 - 2) = 3*7*11 squarefree.
a(9196727) = 1 with 9196727 - (4^6 - 6) = 19*211*2293 squarefree.
a(16130577) = 1 with 16130577 - (4^9 - 9) = 2*7934221 squarefree.
a(38029402) = 1 with 38029402 - (4^1 - 1) = 1153*32983 squarefree.
a(180196927) = 1 with 180196927 - (4^11 - 11) = 2*139*227*2789 squarefree.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=4^n-n;
    tab={};Do[r=0;k=0;Label[bb];If[f[k]>=n,Goto[aa]];If[SquareFreeQ[n-f[k]],r=r+1];k=k+1;Goto[bb];Label[aa];tab=Append[tab,r],{n,1,100}];Print[tab]

A364025 Semiprimes with no squarefree neighbors.

Original entry on oeis.org

26, 49, 51, 55, 91, 161, 235, 249, 295, 305, 339, 341, 362, 377, 413, 415, 451, 485, 489, 551, 559, 579, 629, 649, 667, 685, 687, 703, 721, 723, 737, 749, 849, 851, 917, 926, 949, 951, 955, 989, 1027, 1057, 1059, 1077, 1079, 1099, 1126, 1133, 1135, 1149, 1169, 1205, 1207, 1211, 1241
Offset: 1

Views

Author

Massimo Kofler, Jul 01 2023

Keywords

Examples

			25 = 5^2, 26 = 2 * 13, 27 = 3^3, so 26 is a term.
50 = 2 * 5^2, 51 = 3 * 17, 52 = 2^2 * 13, so 51 is a term.
		

Crossrefs

Intersection of A001358 and A281192.

Programs

  • Maple
    filter:= proc(n) uses numtheory; not issqrfree(n-1) and not issqrfree(n+1) and bigomega(n) = 2 end proc:
    selest(filter, [$1..2000]); # Robert Israel, Dec 12 2023
  • Mathematica
    Select[Range[1300], PrimeOmega[#] == 2 && ! AnyTrue[# + {-1, 1}, SquareFreeQ] &] (* Amiram Eldar, Jul 01 2023 *)
  • PARI
    isok(k) = (bigomega(k)==2) && !issquarefree(k-1) && !issquarefree(k+1); \\ Michel Marcus, Aug 12 2023

A357315 Numbers m such that for all k < m, at least one of m*k - 1 and m*k + 1 is squarefree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 30, 32, 36, 42, 44, 48, 50, 52, 54, 56, 62, 64, 66, 70, 72, 78, 84, 90, 96, 126, 132, 140, 144, 150, 156, 168, 180, 198, 210, 216, 228, 240, 246, 264, 270, 360, 378, 390, 414, 420, 450, 510, 546, 630, 780, 840, 1230, 1470, 1680, 5250
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 17 2022

Keywords

Comments

Conjecture: this sequence is finite.
a(70) > 2*10^7, if it exists. - Giovanni Resta, Oct 20 2022

Examples

			11 is not in this sequence because 11*5-1=54, 11*5+1=56 are both squareful numbers and 11*9-1=98, 11*9+1=100 are both squareful numbers.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2000] | #[k: k in [1..n-1] | not IsSquarefree(n*k-1) and not IsSquarefree(n*k+1)] eq 0];
    
  • Mathematica
    q[n_] := AllTrue[Range[n - 1]*n, SquareFreeQ[# - 1] || SquareFreeQ[# + 1] &]; Select[Range[2000], q] (* Amiram Eldar, Oct 20 2022 *)
  • PARI
    isok(m) = for (k=1, m-1, if (!issquarefree(m*k - 1) && !issquarefree(m*k + 1), return(0));); return(1); \\ Michel Marcus, Oct 20 2022

Extensions

Name edited by Thomas Scheuerle, Oct 20 2022
a(69) from Amiram Eldar, Oct 20 2022

A364905 Sphenic numbers with no squarefree neighbors.

Original entry on oeis.org

170, 530, 595, 638, 651, 665, 874, 962, 1015, 1209, 1495, 1551, 1695, 1749, 1826, 1855, 2035, 2255, 2365, 2431, 2451, 2465, 2526, 2674, 2717, 2726, 2737, 2739, 2751, 2755, 2782, 2849, 2874, 3115, 3145, 3178, 3363, 3367, 3451, 3619, 3655, 3689, 3835, 3905, 3970, 4015, 4017, 4047, 4085
Offset: 1

Views

Author

Massimo Kofler, Aug 12 2023

Keywords

Examples

			169 = 13^2, 170 = 2 * 5 * 17, 171 = 3^2 * 19, so 170 is a term.
529 = 53^2, 530 = 2 * 5 * 53, 531 = 3^2 * 59, so 530 is a term.
		

Crossrefs

Intersection of A007304 and A281192.

Programs

  • Mathematica
    Select[Range[4500], FactorInteger[#][[;; , 2]] == {1, 1, 1} && ! Or @@ SquareFreeQ /@ (# + {-1, 1} ) &] (* Amiram Eldar, Aug 12 2023 *)
  • PARI
    isok(k) = (bigomega(k)==3) && (omega(k)==3) && !issquarefree(k-1) && !issquarefree(k+1); \\ Michel Marcus, Aug 12 2023

A230125 Fibonacci numbers with no squarefree neighbors.

Original entry on oeis.org

55, 89, 233, 377, 5702887, 9227465, 24157817, 39088169, 7778742049, 86267571272, 139583862445, 591286729879, 956722026041, 2504730781961, 4052739537881, 61305790721611591, 99194853094755497, 259695496911122585, 420196140727489673, 135301852344706746049
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 10 2013

Keywords

Comments

First even term is the 54th Fibonacci number. The next even term is 927372692193078999176, which is the 102nd Fibonacci number. - Alonso del Arte, Oct 11 2013

Examples

			55 is in the sequence because 54 = 2 * 3^3 and 56 = 2^3 * 7 are not squarefree numbers.
89 is in the sequence because 88 = 2^3 * 11 and 90 = 2 * 3^2 * 5 are not squarefree numbers.
144 is not in the sequence because both 143 = 11 * 13 and 145 = 5 * 29 are squarefree.
		

Crossrefs

Intersection of A000045 and A281192.

Programs

  • Maple
    issqrfreeneigh := proc(n) return not (issqrfree(m-1) or issqrfree(m+1)): end proc: for n from 1 to 100 do m:=combinat[fibonacci](n): if issqrfreeneigh(m) then printf("%d, ", m): end if: end do: # Nathaniel Johnston, Oct 11 2013
  • Mathematica
    Select[Fibonacci[Range[100]], Abs[MoebiusMu[# - 1]] + Abs[MoebiusMu[# + 1]] == 0 &] (* Alonso del Arte, Oct 11 2013 *)
    Select[Fibonacci[Range[100]],NoneTrue[#+{1,-1},SquareFreeQ]&] (* Harvey P. Dale, Oct 09 2021 *)

Extensions

a(5)-a(20) from Nathaniel Johnston, Oct 11 2013
Showing 1-7 of 7 results.