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!)
A349243 Indices of triangular numbers A000217 with only odd digits. 6

%I #21 Sep 06 2023 13:25:00

%S 1,2,5,10,13,17,18,26,34,58,62,101,109,138,149,154,177,178,186,189,

%T 250,257,266,382,554,586,589,621,622,862,893,1013,1050,1057,1069,1258,

%U 1354,1370,1634,1658,1738,1754,1777,1786,1853,1885,1965,2657,2666,2741,2818,3218,3346,3445,3457,3794,3845

%N Indices of triangular numbers A000217 with only odd digits.

%H S. S. Gupta, <a href="http://www.shyamsundergupta.com/canyoufind.htm">Can You Find (CYF) no. 55</a>, Nov 11 2021.

%F a(n) = floor(sqrt(2*A117960(n))).

%p a:= proc(n) option remember; local k; for k from

%p 1+`if`(n=1, 0, b(n-1)) while 0=mul(irem(i, 2),

%p i=convert(k*(k+1)/2, base, 10)) do od; k

%p end:

%p seq(a(n), n=1..57); # _Alois P. Heinz_, Nov 22 2021

%t Select[Range[4000], AllTrue[IntegerDigits[#*(# + 1)/2], OddQ] &] (* _Amiram Eldar_, Nov 20 2021 *)

%t Position[Accumulate[Range[4000]],_?(AllTrue[IntegerDigits[#],OddQ]&)]//Flatten (* _Harvey P. Dale_, Sep 06 2023 *)

%o (PARI) select( {is_A349243(n)=Set(digits(n*(n+1)\2)%2)==[1]}, [1..9999])

%o (Python)

%o from itertools import islice, count

%o def A349243(): return filter(lambda n: set(str(n*(n+1)//2)) <= {'1','3','5','7','9'}, count(0))

%o A349243_list = list(islice(A349243(),20)) # _Chai Wah Wu_, Nov 22 2021

%Y Cf. A000217 (triangular numbers), A014261 (numbers with only odd digits), A117960 (triangular numbers with only odd digits).

%K nonn,base

%O 1,2

%A _M. F. Hasler_, Nov 20 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 May 2 15:37 EDT 2024. Contains 372197 sequences. (Running on oeis4.)