login
Greatest common divisors of consecutive terms of numbers of the form 2^i*5^j.
3

%I #22 Mar 09 2026 08:40:55

%S 1,2,1,1,2,2,4,5,1,8,10,2,16,20,25,1,32,40,50,2,64,80,100,4,1,5,160,

%T 200,8,2,10,320,400,16,4,20,5,25,800,32,8,40,10,50,1600,64,16,80,20,

%U 100,25,125,128,32,160,40,200,50,250,256,64,320,80,400,100,500

%N Greatest common divisors of consecutive terms of numbers of the form 2^i*5^j.

%C All terms are elements of A003592. - _Chai Wah Wu_, Mar 09 2026

%H Michael De Vlieger, <a href="/A393164/b393164.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael De Vlieger, <a href="/A393164/a393164.png">Log log scatterplot of a(n)</a>, n = 1..2^20.

%F a(n) = gcd(A003592(n), A003592(n+1)).

%t s = With[{n = 10^5}, Union@ Flatten@ Table[2^i*5^j, {i, 0, Log2[n]}, {j, 0, Log[5, n/2^i] } ] ]; MapApply[GCD, Partition[s, 2, 1] ]

%o (Python)

%o from math import gcd

%o from sympy import integer_log

%o from oeis_sequences.OEISsequences import bisection

%o def A393164(n):

%o def f(x): return n+x-sum((x//5**i).bit_length() for i in range(integer_log(x,5)[0]+1))

%o return gcd(m:=bisection(f,n,n),bisection(lambda x:f(x)+1,m,m)) # _Chai Wah Wu_, Mar 09 2026

%o (PARI) a(n)= my(m=5, p=0, r=List([1]), v); while(#r<=n, while((v=r[p++]*2)<m, listput(~r, v)); listput(~r, m); listput(~r, v); m*=5); gcd(r[n], r[n+1]); \\ _Ruud H.G. van Tol_, Mar 09 2026

%Y Cf. A003592, A112752, A186711.

%K nonn,easy,look

%O 1,2

%A _Michael De Vlieger_, Mar 04 2026