login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A340574 a(1) = 112. a(n) is the smallest number k with the sum of the even digits equal to the sum of the odd digits (A036301), which is not an earlier term, for which k*a(n - 1) has the sum of the even digits equal to the sum of the odd digits (A036301). 0

%I #15 Sep 08 2022 08:46:26

%S 112,583,1120,781,1452,615,1627,1694,1506,1403,1078,1043,538,121,4983,

%T 1087,1708,1304,314,385,341,134,187,1340,718,2123,358,1021,1102,211,

%U 835,2110,1322,3265,2558,561,1034,871,2167,3085,1232,1245,413,2716,1201,1012,336

%N a(1) = 112. a(n) is the smallest number k with the sum of the even digits equal to the sum of the odd digits (A036301), which is not an earlier term, for which k*a(n - 1) has the sum of the even digits equal to the sum of the odd digits (A036301).

%C Sequence only with terms in A036301 for which a(n)*a(n+1) is a term in A036301.

%C a(1) = 112 = A036301(2) is the first nonzero term of A036301.

%C The sequence is infinite.

%e a(1) = 112, a(2) = 583 = A036301(22) and a(1)*a(2) = 112*583 = 65296 is a term in A036301 because 6 + 2 + 6 = 14 = 5 + 9.

%e a(2) = 583, a(3) = 1120 = A036301(41) and a(2)*a(3) = 583*1120 = 652960 is a term in A036301 because 6 + 2 + 6 + 0 = 14 = 5 + 9.

%o (Magma) f:=func<n|&+[(-1)^c*c:c in Intseq(n)] eq 0>; a:=[112]; for n in [2..50] do k:=1; while k in a or not f(k) or not f(k*a[n-1]) do k:=k+1; end while; Append(~a,k); end for; a;

%o (PARI) isokd(n) = my(d=digits(n)); sum(k=1, #d, d[k]*(d[k] % 2)) == sum(k=1, #d, d[k]*(1-d[k]%2)); \\ A036301

%o nextk(va, n) = {my(ok = 0, k = 1); while (! (isokd(k) && isokd(k*va[n-1]) && !#select(x->(x==k), va)), k++); k;}

%o lista(nn) = {my(va = vector(nn)); va[1] = 112; for (n=2, nn, my(k = nextk(va, n)); va[n] = k;); va;} \\ _Michel Marcus_, Jan 14 2021

%Y Cf. A036301, A340470.

%K nonn,base

%O 1,1

%A _Marius A. Burtea_, Jan 12 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 13:41 EDT 2024. Contains 371914 sequences. (Running on oeis4.)