login
Integers that are divisible by 5 and not by 4, and whose reverse is divisible by 4 and not by 5.
1

%I #18 Dec 24 2021 11:01:26

%S 25,65,210,215,230,235,250,255,270,275,290,295,405,425,445,465,485,

%T 610,615,630,635,650,655,670,675,690,695,805,825,845,865,885,2105,

%U 2110,2115,2125,2130,2135,2145,2150,2155,2165,2170,2175,2185,2190,2195,2305,2310,2315,2325,2330,2335

%N Integers that are divisible by 5 and not by 4, and whose reverse is divisible by 4 and not by 5.

%C Numbers beginning with 21, 23, 25, 27, 29, 40, 42, 44, 46, 48, 61, 63, 65, 67, 69, 80, 82, 84, 86, 88 and ending with 05, 10, 15, 25, 30, 35, 45, 50, 55, 65, 70, 75, 85, 90, 95. The number of d-digit terms is 3*10^(d-2) for d >= 3. - _Jianing Song_, Dec 24 2021

%H Ana Rechtman, <a href="http://images.math.cnrs.fr/Decembre-2021-3e-defi.html">Décembre 2021, 3e défi</a>, Images des Mathématiques, CNRS, 2021.

%e 25 is term since it is divisible by 5 and not by 4, while 52, it reverse, is divisible by 4 and not by 5.

%t Select[5 * Range[500], ! Divisible[#, 4] && Divisible[(r = IntegerReverse[#]), 4] && ! Divisible[r, 5] &] (* _Amiram Eldar_, Dec 21 2021 *)

%o (PARI) isok(k) = if ((k%4) && !(k%5), k=fromdigits(Vecrev(digits(k))); (k%5) && !(k%4));

%o (Python)

%o from itertools import count, islice

%o def A350233gen(): return filter(lambda n:(m := int(str(n)[::-1])) % 5 and not m % 4,filter(lambda n: n % 4 and not n % 5,count(1)))

%o A350233_list = list(islice(A350233gen(),20)) # _Chai Wah Wu_, Dec 21 2021

%Y Cf. A004086, A350232.

%Y Subsequence of A008587.

%K nonn,base

%O 1,1

%A _Michel Marcus_, Dec 21 2021