A004611 Divisible only by primes congruent to 1 mod 3.
1, 7, 13, 19, 31, 37, 43, 49, 61, 67, 73, 79, 91, 97, 103, 109, 127, 133, 139, 151, 157, 163, 169, 181, 193, 199, 211, 217, 223, 229, 241, 247, 259, 271, 277, 283, 301, 307, 313, 331, 337, 343, 349, 361, 367, 373, 379, 397, 403, 409, 421, 427, 433, 439, 457
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- J. H. Conway, E. M. Rains and N. J. A. Sloane, On the existence of similar sublattices, Canad. J. Math. 51 (1999), 1300-1306 (Abstract, pdf, ps).
- Walter Kehowski, D Numbers.
- Index entries for sequences related to A2 = hexagonal = triangular lattice
Crossrefs
Programs
-
Magma
[n: n in [1..500] | forall{d: d in PrimeDivisors(n) | d mod 3 eq 1}]; // Vincenzo Librandi, Aug 21 2012
-
Maple
with(numtheory): for n from 1 to 1801 by 6 do it1 := ifactors(n)[2]: it2 := 1: for i from 1 to nops(it1) do if it1[i][1] mod 6 > 1 then it2 := 0; break fi: od: if it2=1 then printf(`%d,`,n) fi: od: with(numtheory): cnt:=0: L:=[]: for w to 1 do for n from 1 while cnt<100 do dn:=divisors(n); Q:=map(z-> n+z+1, dn); if andmap(z-> z mod 3 = 0, Q) then cnt:=cnt+1; L:=[op(L),[cnt,n]]; fi; od od; L; # Walter Kehowski, Aug 09 2006
-
Mathematica
ok[1]=True;ok[n_]:=And@@(Mod[#,3]==1&)/@FactorInteger[n][[All,1]];Select[Range[500],ok] (* Vincenzo Librandi, Aug 21 2012 *) lst={}; maxLen=331; Do[If[Reduce[m^2+m*n+n^2==k^2&&m>=n>=0&&GCD[k, m, n]==1, {m, n}, Integers]===False, Null[], AppendTo[lst, k]], {k, maxLen}]; lst (* Frank M Jackson, Jul 04 2013 from A034017 *)
-
PARI
is(n)=my(f=factor(n)[,1]);for(i=1,#f,if(f[i]%3!=1,return(0)));1 \\ Charles R Greathouse IV, Feb 06 2013
-
PARI
list(lim)=my(v=List([1]), mn, mx, t); forprime(p=7, lim\=1, if(p%6==1, listput(v, p))); if(lim<49, return(Vec(v))); forprime(p=7, sqrtint(lim), if(p%6>1, next); mx=1; while(v[mx+1]*p<=lim, for(i=mn=mx+1, mx=#v, t=p*v[i]; if(t>lim, break); listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Jan 11 2018
Extensions
More terms from James Sellers, Oct 30 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 31 2007
Comments