A380758 Numbers which are not prime powers and their prime factors share a last digit in base 10.
39, 69, 117, 119, 129, 159, 207, 219, 249, 259, 299, 309, 329, 339, 341, 351, 387, 451, 469, 477, 489, 507, 519, 551, 559, 579, 621, 629, 657, 669, 671, 679, 689, 699, 747, 749, 781, 789, 799, 833, 849, 879, 889, 897, 927, 939, 949, 959, 989, 1017, 1053, 1059
Offset: 1
Examples
39 = 3*13.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
- VOS 2025 Math Region stage, Problem 10.9 (in Russian).
Crossrefs
Cf. A004615.
Programs
-
Maple
q:= n-> (l-> nops(l)>1 and nops({map(i-> irem(i[1], 10), l)[]})=1)(ifactors(n)[2]): select(q, [$1..2000])[]; # Alois P. Heinz, Feb 18 2025
-
Mathematica
Sort[Times@@@Cases[Subsets[Prime[Range[100]],{2}],?(Mod[#[[1]]-#[[2]],10]==0&)]][[;;100]] (* _Shenghui Yang, Feb 18 2025 *)
-
PARI
isok(k) = my(f=factor(k)); (#f~ != 1) && (#Set(vector(#f~, i, f[i,1] % 10)) == 1); \\ Michel Marcus, Feb 18 2025
-
Python
from sympy import factorint def ok(n): return len(f:=factorint(n)) > 1 and len(set(p%10 for p in f)) == 1 print([k for k in range(1, 1060) if ok(k)]) # Michael S. Branicky, Feb 18 2025
Comments