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.

This page as a plain text file.
%I A165135 #24 Feb 19 2024 10:48:08
%S A165135 9,90,252,1872,4464,29250,62946,393912,809442,4945140,9899910,
%T A165135 59366286,116999892,692936460,1349989992,7919601912,15299999856,
%U A165135 89099130960,170999999838,989995038012,1889999872488,10889990099100,20699999999802,118799939782206,224999999981964
%N A165135 The number of n-digit positive papaya numbers.
%C A165135 Papaya numbers are concatenations of two palindromes or palindromes themselves. All one-digit and two-digit numbers are papaya numbers.
%H A165135 Andrew Howroyd, <a href="/A165135/b165135.txt">Table of n, a(n) for n = 1..200</a>
%H A165135 Tanya Khovanova, <a href="http://blog.tanyakhovanova.com/?p=177">Papaya Words and Numbers</a>
%F A165135 a(n) = A052268(n)-A165611(n). - _R. J. Mathar_, Sep 25 2009
%F A165135 a(n) = 9*R(n,10)/10 - Sum_{d|n,d<n} phi(n/d)*a(d) where R(2*k,r)=k*(r+1)*r^k, R(2*k+1,r)=(2*k+1)*r^(k+1). - _Andrew Howroyd_, Mar 29 2016
%e A165135 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.
%o A165135 (PARI)
%o A165135 R(n,b)=if(n%2==0, n/2*(b+1)*b^(n/2), n*b^((n+1)/2));
%o A165135 a(n) = 9*R(n,10)/10 - sumdiv(n, d, if(n<>d, eulerphi(n/d)*a(d))); \\ _Andrew Howroyd_, Oct 14 2017
%o A165135 (Python)
%o A165135 from functools import lru_cache
%o A165135 from sympy import totient, proper_divisors
%o A165135 @lru_cache(maxsize=None)
%o A165135 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
%Y A165135 Cf. A007055, A052268, A165610, A165611.
%K A165135 base,nonn
%O A165135 1,1
%A A165135 Sergei Bernstein and _Tanya Khovanova_, Sep 04 2009
%E A165135 a(7)-a(8) from _R. J. Mathar_, Sep 25 2009
%E A165135 a(9)-a(25) from _Andrew Howroyd_, Mar 29 2016