login
Divisible only by primes congruent to 1 mod 3.
31

%I #78 Sep 08 2022 08:44:33

%S 1,7,13,19,31,37,43,49,61,67,73,79,91,97,103,109,127,133,139,151,157,

%T 163,169,181,193,199,211,217,223,229,241,247,259,271,277,283,301,307,

%U 313,331,337,343,349,361,367,373,379,397,403,409,421,427,433,439,457

%N Divisible only by primes congruent to 1 mod 3.

%C In other words, if a prime p divides n, then p == 1 mod 3.

%C Equivalently, products of primes == 1 (mod 6), products of elements of A002476.

%C Positive integers n such that n+d+1 is divisible by 3 for all divisors d of n. For example, a(13)=91 since 91=7*13, 91+1+1=93=3*31, 91+7+1=99=9*11, 91+13+1=105=3*7*5, 91+91+1=183=3*61. The only prime p such that x+d+1 is divisible by p for all divisors d of x is p=3. The sequence consists of 1 and all integers whose prime divisors are of the form 6k+1. - _Walter Kehowski_, Aug 09 2006

%C Also z such that z^2 = x^2 + x*y + y^2 and gcd(x,y,z) = 1. - _Frank M Jackson_, Jul 30 2013

%C From _Jean-Christophe Hervé_, Nov 24 2013: (Start)

%C Apart from the first term (for all in this comment), this sequence is the analog of A008846 (hypotenuses of primitive Pythagorean triangles) for triangles with integer sides and a 120-degree angle: a(n), n>1, is the sequence of lengths of the longest side of the primitive triangles.

%C Not only the square of these numbers is equal to x^2 + xy + y^2 with x and y > 0, but the numbers themselves also are; the sequence starting at n=2 is then a subsequence of A024606.

%C (End)

%C Numbers n such that 3/n cannot be written as the sum of 2 unit fractions. - _Carl Schildkraut_, Jul 19 2016

%C a(n), n>1, is the sequence of lengths of the middle side b of the primitive triangles such that A < B < C with an angle B = 60 degrees (A335895). Compare with comment of Nov 24 2013 where a(n), n>1, is the sequence of lengths of the longest side of the primitive triangles that have an angle = 120 degrees. - _Bernard Schott_, Mar 29 2021

%H T. D. Noe, <a href="/A004611/b004611.txt">Table of n, a(n) for n = 1..10000</a>

%H J. H. Conway, E. M. Rains and N. J. A. Sloane, On the existence of similar sublattices, Canad. J. Math. 51 (1999), 1300-1306 (<a href="http://neilsloane.com/doc/sim.txt">Abstract</a>, <a href="http://neilsloane.com/doc/sim.pdf">pdf</a>, <a href="http://neilsloane.com/doc/sim.ps">ps</a>).

%H Walter Kehowski, <a href="http://web.gccaz.edu/~walof42631/propertyd/index.html">D Numbers</a>.

%H <a href="/index/Aa#A2">Index entries for sequences related to A2 = hexagonal = triangular lattice</a>

%p 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:

%p 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

%t ok[1]=True;ok[n_]:=And@@(Mod[#,3]==1&)/@FactorInteger[n][[All,1]];Select[Range[500],ok] (* _Vincenzo Librandi_, Aug 21 2012 *)

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

%o (Magma) [n: n in [1..500] | forall{d: d in PrimeDivisors(n) | d mod 3 eq 1}]; // _Vincenzo Librandi_, Aug 21 2012

%o (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

%o (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

%Y Cf. A004612, A034017, A120806, A024606, A008846, A335895.

%Y Multiplicative closure of A002476.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

%E More terms from _James A. Sellers_, Oct 30 2000

%E Edited by _N. J. A. Sloane_ at the suggestion of _Andrew S. Plewe_, May 31 2007