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.
%I A272799 #28 Apr 24 2024 17:02:41 %S A272799 1,2,3,6,7,8,9,10,11,15,16,17,18,19,20,21,26,27,28,29,30,33,34,35,36, %T A272799 39,42,43,44,45,46,47,48,51,52,53,54,55,56,57,64,65,66,69,70,71,72,75, %U A272799 78,79,80,81,82,83,89,90,91,92,93,96,97,98,99,100,101,102,105,106,107,108,109,110 %N A272799 Numbers k such that 2*k - 1 and 2*k + 1 are squarefree. %C A272799 The asymptotic density of this sequence is 2 * Product_{p prime} (1 - 2/p^2) = 2 * A065474 = 0.645268... . - _Amiram Eldar_, Feb 10 2021 %H A272799 Robert Israel, <a href="/A272799/b272799.txt">Table of n, a(n) for n = 1..10000</a> %F A272799 a(n) = (A069977(n)+1)/2. - _Charles R Greathouse IV_, May 15 2016 %e A272799 a(1) = 1 because 2*1 - 1 = 1 is squarefree and 2*1 + 1 = 3 is squarefree. %p A272799 Res:= NULL: count:= 0: state:= 1; %p A272799 for n from 1 while count < 100 do %p A272799 if numtheory:-issqrfree(2*n+1) then %p A272799 if state = 1 then Res:= Res, n; count:= count+1; %p A272799 else %p A272799 state:= 1; %p A272799 fi %p A272799 else %p A272799 state:= 0; %p A272799 fi %p A272799 od: %p A272799 Res; # _Robert Israel_, Apr 15 2019 %t A272799 Select[Range[12^4], And[Or[# == 1, GCD @@ FactorInteger[#][[All, 2]] > 1], SquareFreeQ[# - 1], SquareFreeQ[# + 1]] &] (* _Michael De Vlieger_, May 08 2016 *) %o A272799 (Magma) [n: n in [1..110] | IsSquarefree(2*n-1) and IsSquarefree(2*n+1)]; %o A272799 (PARI) is(n)=issquarefree(2*n-1) && issquarefree(2*n+1) \\ _Charles R Greathouse IV_, May 15 2016 %o A272799 (Python) %o A272799 from itertools import count, islice %o A272799 from sympy import factorint %o A272799 def A272799_gen(startvalue=1): # generator of terms >= startvalue %o A272799 return filter(lambda k:max(factorint((k<<1)-1).values(),default=1)==1 and max(factorint((k<<1)+1).values())==1, count(max(startvalue,1))) %o A272799 A272799_list = list(islice(A272799_gen(),20)) # _Chai Wah Wu_, Apr 24 2024 %Y A272799 Cf. A005117, A065474, A069977, A226993. %K A272799 nonn,easy %O A272799 1,2 %A A272799 _Juri-Stepan Gerasimov_, May 06 2016