A271817
Smallest k > 1 such that none of k^2 + 0, k^2 + 1, k^2 + 2,..., k^2 + n are squarefree.
Original entry on oeis.org
2, 7, 32, 41, 239, 13982, 240761, 240761, 26220368, 93499279
Offset: 0
a(0) = 2 because 2 > 1 and none of 2^2 + 0 = 4 = 2^2 is squarefree,
a(1) = 7 because none of 7^2 + 0 = 49 = (7^2), 7^2 + 1 = 50 =(5^2)*2 are squarefree,
a(2) = 32 because none of 32^2 + 0 = 1024 = (2^2)*156, 32^2 + 1 = 1025 = (5^2)*41, 32^2 + 2 = 1026 = (3^2)*114 are squarefree.
-
isok(k, n) = {for (j=0, n, if (issquarefree(k^2+j), return (0));); 1;}
a(n) = {my(k = 2); while (! isok(k, n), k++); k;} \\ Michel Marcus, Apr 14 2016
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
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.
-
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]
-
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; }
A380595
a(n) is the first nonsquarefree number k such that the n consecutive nonsquarefree numbers starting with k are in arithmetic progression.
Original entry on oeis.org
4, 4, 16, 28, 28, 5050, 6348, 144946, 3348550, 221167422, 221167422, 47255689915, 82462576220, 1043460553364, 79180770078548, 3215226335143218, 23742453640900972, 125781000834058568
Offset: 1
a(2) = 4 because the 2 nonsquarefree numbers starting with 4 are 4, 6, forming an arithmetic progression with difference 2.
a(3) = 16 because the 3 nonsquarefree numbers starting with 16 are 16, 18, 20, forming an arithmetic progression with difference 2.
a(4) = a(5) = 28 because the 5 nonsquarefree numbers starting with 28 are 28, 32, 36, 40, 44, forming an arithmetic progression with difference 4.
a(6) = 5050 because the 6 nonsquarefree numbers starting with 5050 are 5050, 5052, 5054, 5056, 5058, 5060, forming an arithmetic progression with difference 2.
a(7) = 6348 because the 7 nonsquarefree numbers starting with 6348 are 6348, 6350, 6352, 6354, 6356, 6358, 6360, forming an arithmetic progression with difference 2.
a(8) = 144946, because the 8 nonsquarefree numbers starting with 144946 are 144946, 144948, 144950, 144952, 144954, 144956, 144958, 144960, forming an arithmetic progression with difference 2.
a(9) = 3348550, because the 9 nonsquarefree numbers starting with 3348550 are 3348550, 3348552, 3348554, 3348556, 3348558, 3348560, 3348562, 3348564, 3348566, forming an arithmetic progression with difference 2.
-
nsf:= remove(numtheory:-issqrfree, [$4..4*10^6]):
S:= nsf[2..-1]-nsf[1..-2]: nS:= nops(S):
R:= NULL:
for m from 1 do
found:= false;
for t from 1 to nS +1-m do
if nops(convert(S[t..t+m-1],set))=1 then R:= R,nsf[t]; found:= true; break fi
od;
if not found then break fi;
od:
R;
A055554
An arithmetic progression each term of which is followed by at least 4 nonsquarefree consecutive integers.
Original entry on oeis.org
242, 1757711582, 3515422922, 5273134262, 7030845602, 8788556942, 10546268282, 12303979622, 14061690962, 15819402302, 17577113642, 19334824982, 21092536322, 22850247662, 24607959002, 26365670342
Offset: 1
A172436
Smallest m such that the Moebius function takes successively, from m, n values 1,0,1,0,... ending with 1 or 0.
Original entry on oeis.org
1, 15, 55, 159, 411, 411, 411, 3647, 15243, 15243, 15243, 113343, 1133759, 1133759, 1133759, 29149139
Offset: 1
a(3) = 55 since Moebius(55) = 1, Moebius(56) = 0, Moebius(57) = 1, and this pattern does not occur for any smaller value of n.
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, Tenth Printing, 1972, p. 826.
- T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 24.
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 161, #16.
- Deleglise, Marc and Rivat, Joel, Computing the summation of the Mobius function. Experiment. Math. 5 (1996), no. 4, 291-295.
- G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 262 and 287.
-
a(n)=local(ok,m);m=1;while(1,ok=1;for(k=1,n,if(moebius(m+k-1)!=k%2,ok=0;break));if(ok,return(m));m++)
A268270
Least prime that is at distance > n from the nearest squarefree number.
Original entry on oeis.org
2, 17, 727, 47527, 29002021, 494501773, 44633461423, 7489886099881
Offset: 0
a(0)=2 is the least prime and it is at distance 1 from the nearest squarefree numbers (1 and/or 3).
a(1)=17 is the least prime that has no squarefree neighbor: both 16 and 18 are divisible by a square; the nearest squarefree numbers, 15 and 19, are both at distance 2.
a(2)=727 is the least prime p such that p-2 and p+1 are (two consecutive terms) in A068781, namely A068781(75..76).
a(3)=47527 is the least prime p such that p-3 and p+1 are (two consecutive terms) in A070258, namely A070258(878..879).
a(4)=29002021 is the least prime p such that p-4 and p+1 are (two consecutive terms) in A070284.
a(5)=494501773 is the least prime p such that p-5 and p+1 are (two consecutive terms) in A078144.
Similarly, for n = 6, 7, 8 and 9, a(n) is the least prime p such that p-n and p+1 are (two consecutive terms) in A049535, A077640, A077647 and A078143, respectively.
-
a(n)=forprime(p=n,,for(s=1,n,(issquarefree(p-s)||issquarefree(p+s)) && next(2)); return(p))
A319502
Indices of Mertens's function M(n) (A002321) whose nearest neighbors have value 0.
Original entry on oeis.org
165, 237, 330, 354, 357, 365, 402, 406, 421, 426, 794, 797, 813, 885, 894, 897, 905, 914, 1257, 1281, 1290, 1298, 1301, 1337, 1522, 1526, 1545, 1842, 1865, 2094, 2098, 2118, 2121, 2137, 4602, 4609, 4621, 4629, 4726, 4729, 4738, 5106, 5109, 5198, 5206, 5221
Offset: 1
165 is a term because A002321(164) = A002321(166) = 0.
237 is a term because A002321(236) = A002321(238) = 0.
-
with(numtheory): a:=n->add(mobius(k),k=1..n): select(n->a(n-1)=0 and a(n+1)=0,[$2..2200]); # Muniru A Asiru, Sep 20 2018
-
With[{s = Partition[Accumulate@ Array[MoebiusMu, 5300], 3, 1]}, 1 + First /@ Position[s, {0, k_, 0} /; k != 0]] (* Michael De Vlieger, Sep 24 2018 *)
-
isok(n) = {if (n > 1, x = sum(k=1, n-1, moebius(k)); if (x == 0, if (x + moebius(n) + moebius(n+1) == 0, return (1)););); return (0);} \\ Michel Marcus, Sep 27 2018
A319520
Starts of strictly increasing runs of 0's in Mertens's function A002321.
Original entry on oeis.org
2, 39, 331, 422, 45371, 22898822, 871469945, 1319506393071, 26296710367071
Offset: 1
2 is a term because M(2) = 0.
39 is a term because M(39) = M(40) = 0.
331 is a term because M(331) = M(332) = M(333) = 0.
422 is a term because M(422) = ... = M(425) = 0.
45371 is a term because M(45371) = ... = M(45376) = 0.
-
With[{s = Map[Boole[# == 0] &, Accumulate@ Array[MoebiusMu, 10^5]]}, Union@ Array[SequencePosition[s, ConstantArray[1, #]][[1, 1]] &, 5]] (* Michael De Vlieger, Sep 26 2018 *)
-
M=S=R=0;for(n=1,oo,if(!M+=moebius(n),S||S=n,S,n-S>R&&print1(S",")+R=n-S;S=0)) \\ M. F. Hasler, Nov 23 2018
Comments