login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #21 Oct 19 2024 15:57:32

%S 52,56,504,508,512,516,524,528,532,536,544,548,552,556,564,568,572,

%T 576,584,588,592,596,5004,5008,5012,5016,5024,5028,5032,5036,5044,

%U 5048,5052,5056,5064,5068,5072,5076,5084,5088,5092,5096,5104,5108,5112,5116,5124,5128,5132,5136,5144

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

%C Numbers beginning with 5 and ending with 04, 08, 12, 16, 24, 28, 32, 36, 44, 48, 52, 56, 64, 68, 72, 76, 84, 88, 92, 96. The number of d-digit terms is 2*10^(d-2) for d >= 2. - _Jianing Song_, Dec 24 2021

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

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

%t Select[4 * Range[1300], ! Divisible[#, 5] && Divisible[(r = IntegerReverse[#]), 5] && ! Divisible[r, 4] &] (* _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 A350232gen(): return filter(lambda n:(m := int(str(n)[::-1])) % 4 and not m % 5,filter(lambda n: n % 5 and not n % 4,count(1)))

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

%Y Cf. A004086, A350233.

%Y Subsequence of A008586.

%K nonn,base

%O 1,1

%A _Michel Marcus_, Dec 21 2021