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.

A069534 Smallest multiple of 5 with digit sum n.

Original entry on oeis.org

10, 20, 30, 40, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 195, 295, 395, 495, 595, 695, 795, 895, 995, 1995, 2995, 3995, 4995, 5995, 6995, 7995, 8995, 9995, 19995, 29995, 39995, 49995, 59995, 69995, 79995, 89995, 99995, 199995, 299995, 399995, 499995, 599995
Offset: 1

Views

Author

Amarnath Murthy, Apr 01 2002

Keywords

Comments

a(6) onwards the pattern is evident.

Crossrefs

Programs

  • Mathematica
    t={}; Do[i=5; While[Total[IntegerDigits[i]]!=n,i=i+5]; AppendTo[t,i],{n,46}]; t (* Jayanta Basu, May 19 2013 *)
    With[{f=5*Range[200000]},Flatten[Table[Select[f,Total[IntegerDigits[#]] == n&,1],{n,50}]]] (* Harvey P. Dale, Dec 31 2013 *)
  • PARI
    A069534(n)=(((n+4)%9+1)*10^((n+4)\9)-5)*10^(n<5) \\ M. F. Hasler, Sep 16 2016

Formula

a(n) = ((n+4)%9+1)*10^floor((n+4)/9)-5 for all n > 4, where % is the binary mod/remainder operator. - M. F. Hasler, Sep 16 2016
From Chai Wah Wu, Sep 15 2020: (Start)
a(n) = a(n-1) + 10*a(n-9) - 10*a(n-10) for n > 14.
G.f.: 5*x*(72*x^13 - 18*x^12 - 18*x^11 - 18*x^10 - 18*x^9 + 2*x^8 + 2*x^7 + 2*x^6 + 2*x^5 - 7*x^4 + 2*x^3 + 2*x^2 + 2*x + 2)/((x - 1)*(10*x^9 - 1)). (End)
a(n) = 5 * A077492(n). - Alois P. Heinz, Sep 15 2020

Extensions

More terms from Ray Chandler, Jul 28 2003