A383896 Echo numbers: positive integers k such that the largest prime factor of k-1 is a suffix of k.
13, 57, 73, 111, 127, 163, 193, 197, 313, 323, 337, 419, 433, 687, 757, 817, 847, 897, 929, 931, 973, 1037, 1153, 1177, 1211, 1641, 2017, 2311, 2593, 2623, 2647, 2913, 3073, 3137, 3659, 3661, 3829, 4031, 4117, 4213, 4453, 4483, 4537, 4673, 4737, 4971, 5377, 5741
Offset: 1
Examples
k = 4971 is an echo number because k-1 = 4970 = 2*5*7*71 and k ends in 71.
Links
- Giorgos Kalogeropoulos, Table of n, a(n) for n = 1..10000
- Code Golf Stack Exchange, Output the Echo Numbers
- Giorgos Kalogeropoulos, Table of n, a(n) for n = 1..100000
Programs
-
Maple
filter:= proc(n) local p; p:= max(numtheory:-factorset(n-1)); n - p mod 10^(1+ilog10(p)) = 0 end proc: select(filter, [seq(i,i=11..10000,2)]); # Robert Israel, May 14 2025
-
Mathematica
Select[Range[2,6000],(f=FactorInteger[#-1][[-1,1]];Mod[#,10^IntegerLength@f]==f)&]
-
PARI
isok(k) = if (k>2, my(x = vecmax(factor(k-1)[,1]), m = 1+logint(x, 10)); k % 10^m == x); \\ Michel Marcus, May 14 2025
-
Python
from sympy import factorint def ok(n): return n > 2 and str(n).endswith(str(max(factorint(n-1)))) print([k for k in range(6000) if ok(k)]) # Michael S. Branicky, May 14 2025
Comments