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.

A165135 The number of n-digit positive papaya numbers.

Original entry on oeis.org

9, 90, 252, 1872, 4464, 29250, 62946, 393912, 809442, 4945140, 9899910, 59366286, 116999892, 692936460, 1349989992, 7919601912, 15299999856, 89099130960, 170999999838, 989995038012, 1889999872488, 10889990099100, 20699999999802, 118799939782206, 224999999981964
Offset: 1

Views

Author

Sergei Bernstein and Tanya Khovanova, Sep 04 2009

Keywords

Comments

Papaya numbers are concatenations of two palindromes or palindromes themselves. All one-digit and two-digit numbers are papaya numbers.

Examples

			Three-digit papaya numbers are of four types: aaa (total of 9) and aab, aba, abb, (total of 81 for each). Hence a(3) = 252.
		

Crossrefs

Programs

  • PARI
    R(n,b)=if(n%2==0, n/2*(b+1)*b^(n/2), n*b^((n+1)/2));
    a(n) = 9*R(n,10)/10 - sumdiv(n, d, if(n<>d, eulerphi(n/d)*a(d))); \\ Andrew Howroyd, Oct 14 2017
    
  • Python
    from functools import lru_cache
    from sympy import totient, proper_divisors
    @lru_cache(maxsize=None)
    def A165135(n): return 9*(n*10**(n>>1) if n&1 else 11*(a:=n>>1)*10**(a-1))-sum(totient(n//d)*A165135(d) for d in proper_divisors(n,generator=True)) # Chai Wah Wu, Feb 19 2024

Formula

a(n) = A052268(n)-A165611(n). - R. J. Mathar, Sep 25 2009
a(n) = 9*R(n,10)/10 - Sum_{d|n,dAndrew Howroyd, Mar 29 2016

Extensions

a(7)-a(8) from R. J. Mathar, Sep 25 2009
a(9)-a(25) from Andrew Howroyd, Mar 29 2016