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 A279314 #18 Jul 17 2017 13:44:17 %S A279314 4,22,27,58,85,94,105,114,121,150,166,202,204,222,224,265,274,315,319, %T A279314 342,346,355,378,382,391,438,445,450,454,483,517,526,535,540,560,562, %U A279314 576,588,612,627,634,636,640,645,648,654,663,666,690,697,706,728,729,762,778,825,840,841,852 %N A279314 Composite numbers n such that the sum of the prime factors of n, with multiplicity, is congruent to n (mod 9). %C A279314 Supersequence of A006753 (Smith numbers). %C A279314 Sequence is proven infinite due to the infinitude of the Smith numbers. %C A279314 Can be generalized for other moduli. Setting the modulus to 1 yields the composite numbers. Setting the modulus to m (m>=2) yields the supersequence which includes the Smith numbers in base (m+1). Of course, m=1 includes all Smith numbers for any base. %H A279314 Ely Golden, <a href="/A279314/b279314.txt">Table of n, a(n) for n = 1..10000</a> %e A279314 105 is a member as 105 = 3*5*7 with 105 mod 9 = 6 and (3+5+7) mod 9 = 15 mod 9 = 6. %t A279314 Select[Range[4, 860], Function[n, And[CompositeQ@ n, Mod[#, 9] == Mod[n, 9] &@ Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* _Michael De Vlieger_, Dec 10 2016 *) %t A279314 cnnQ[n_]:=CompositeQ[n]&&Mod[Total[Flatten[Table[#[[1]],#[[2]]]&/@ FactorInteger[ n]]],9]==Mod[n,9]; Select[Range[900],cnnQ] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 17 2017 *) %o A279314 (SageMath) %o A279314 def factorSum(f): %o A279314 s=0 %o A279314 for c in range(len(f)): %o A279314 s+=(f[c][0]*f[c][1]) %o A279314 return s %o A279314 #this variable affects the modulus %o A279314 modulus=9 %o A279314 c=2 %o A279314 index=1 %o A279314 while(index<=10000): %o A279314 f=list(factor(c)) %o A279314 if(((len(f)>1)|(f[0][1]>1))&(factorSum(f)%modulus==c%modulus)): %o A279314 print(str(index)+" "+str(c)) %o A279314 index+=1 %o A279314 c+=1 %o A279314 print("complete") %o A279314 (PARI) isok(n) = !isprime(n) && (f=factor(n)) && ((n % 9) == (sum(k=1, #f~, f[k,1]*f[k,2]) % 9)); \\ _Michel Marcus_, Dec 10 2016 %Y A279314 Cf. A006753. %K A279314 nonn %O A279314 1,1 %A A279314 _Ely Golden_, Dec 09 2016