login
Composite numbers which in base 5 contain their largest proper factor as a substring.
1

%I #24 Jun 05 2024 22:26:03

%S 25,35,55,65,85,95,115,125,145,155,175,185,205,215,235,245,265,275,

%T 295,305,325,335,355,365,385,395,415,425,445,455,475,485,505,515,535,

%U 545,565,575,595,605,625,635,655,665,685,695,715,725,745,755,775,785,805

%N Composite numbers which in base 5 contain their largest proper factor as a substring.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F a(n) = 30*n-a(n-1) for n>1, a(1)=25. - _Vincenzo Librandi_, Aug 07 2010

%F From _Chai Wah Wu_, Jun 05 2024: (Start)

%F a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.

%F G.f.: x*(-5*x^2 + 10*x + 25)/((x - 1)^2*(x + 1)). (End)

%t Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 5 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 5 ] ] ] ] != {}, Print[ n ] ], {n, 2, 1000} ]

%o (PARI) a(n)=([0,1,0; 0,0,1; -1,1,1]^(n-1)*[25;35;55])[1,1] \\ _Charles R Greathouse IV_, Jun 05 2024

%Y Cf. A062238.

%K nonn,base,easy

%O 1,1

%A _Robert G. Wilson v_, Aug 08 2001