cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A117960 Triangular numbers with only odd digits.

Original entry on oeis.org

1, 3, 15, 55, 91, 153, 171, 351, 595, 1711, 1953, 5151, 5995, 9591, 11175, 11935, 15753, 15931, 17391, 17955, 31375, 33153, 35511, 73153, 153735, 171991, 173755, 193131, 193753, 371953, 399171, 513591, 551775, 559153, 571915, 791911, 917335, 939135, 1335795
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), May 03 2006

Keywords

Comments

There are infinitely many terms. See Al Zimmermann link. - Shyam Sunder Gupta, Aug 16 2025

Crossrefs

Intersection of A000217 (triangular) and A014261 (only odd digits).
Cf. A117978.

Programs

  • Maple
    b:= proc(n) option remember; local k; for k from
          1+`if`(n=1, 0, b(n-1)) while 0=mul(irem(i, 2),
          i=convert(k*(k+1)/2, base, 10) ) do od; k
        end:
    a:= n-> (t-> t*(t+1)/2)(b(n)):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jul 12 2015
  • Mathematica
    Select[Table[n(n+1)/2,{n,0,1650}],ContainsOnly[IntegerDigits[#],{1,3,5,7,9}]&] (* James C. McMahon, Sep 24 2024 *)
  • PARI
    select( {is_A117960(n)=is_A000217(n)&&is_A014261(n)}, [2*n+1|n<-[0..99999]]) \\ M. F. Hasler, Nov 20 2021
    
  • PARI
    apply( {A117960_row(n,t=10^n\9,L=List())=forvec(v=vector(n,i,[0,4]), is_A000217(n=t+fromdigits(v)*2)&&listput(L,n));L}, [1..6]) \\ row(n) = terms with n digits. Use concat(%) to flatten. - M. F. Hasler, Nov 23 2021
    
  • Python
    from itertools import islice, count
    def A117960(): return filter(lambda n: set(str(n)) <= {'1','3','5','7','9'}, (m*(m+1)//2 for m in count(0)))
    A117960_list = list(islice(A117960(),20)) # Chai Wah Wu, Nov 22 2021

Formula

Intersection of A000217 and A014261. - M. F. Hasler, Nov 20 2021

Extensions

Some terms corrected by Alois P. Heinz, Jul 12 2015

A383939 Numbers k such that k and the k-th triangular number T(k) = k*(k+1)/2 have only even digits.

Original entry on oeis.org

0, 28, 40, 64, 400, 2828, 4000, 4064, 6428, 22840, 24028, 40000, 202428, 240028, 400000, 2040040, 2400028, 4000000, 6422840, 6428064, 6646624, 20044064, 20202080, 20400040, 20406080, 24000028, 40000000, 66400064, 200042428, 204000040, 228406080, 240000028
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 18 2025

Keywords

Comments

The sequence also contains the infinite subsequence 4*10^n for n >= 1.

Examples

			64 is a term since it and T(64) = 2080 both have only even digits.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := And @@ (AllTrue[IntegerDigits[#], EvenQ] & /@ {k, k*(k+1)/2}); Select[Range[0, 4*10^6], q] (* Amiram Eldar, Aug 18 2025 *)
Showing 1-2 of 2 results.