OFFSET
1,2
COMMENTS
Papaya numbers are concatenations of two palindromes or palindromes themselves (think of "papaya" as the concatenation of the palindromes "pap" and "aya").
The actual number of n-digit papaya numbers is A165135. If the pattern is "aa", for example, inserting digits 1 to 9 for "a" gives 9 positive 2-digit numbers, 11, 22, ...,99.The pattern "ab" inserting a<>b gives 10, 12,..,98, that is 9*9 = 81 positive 2-digit numbers.(9 different choices for "a" because leading 0's are not allowed, and for each "a" 9 different choices of "b".)So the a(2) =2 two different patterns represent 9+81= A165135(2) different 2-digit numbers.
The first 19 terms of this sequence are the same as in A165137. Then the sequences start to differ, because the number of patterns in an infinite alphabet can be larger than patterns in the 10-digits-alphabet of ordinary numbers: A165137(20) = a(20)+10. [From Tanya Khovanova, Oct 01 2009] (Since at most 2 symbols in a papaya number can be present only once, to require 11 symbols takes a length of 2 + (11-2)*2 = 20. The 10 strings for A165137(20) not counted here are abcdefghijkjihgfedbc, abacdefghijkjihgfedc, abcbadefghijkjihgfed, ..., abcdefghijihgfedcbak. - Franklin T. Adams-Watters, Apr 10 2011.
LINKS
Tanya Khovanova, Papaya Words and Numbers
FORMULA
a(n) = R(n) - Sum_{d|n,d<n} phi(n/d)*a(d) where R(2*k)=k*(b(k)+b(k+1)), R(2*k+1)=(2*k+1)*b(k+1), b(k)=Sum_{j=1..10} stirling2(k,j). - Andrew Howroyd, Mar 29 2016
EXAMPLE
There are two types of two-digit papaya numbers: aa, or ab. Hence a(2) = 2.
There are four types of three-digit papaya numbers: aaa, aab, aba, abb. Hence a(3) = 4.
There is no pattern of the form "abcdefghijkl" contributing to a(12), because this requires 12 different letters in the alphabet, and the standard numbers alphabet provides only ten different digits 0-9.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Sergei Bernstein and Tanya Khovanova, Sep 04 2009
EXTENSIONS
Three more terms from R. J. Mathar, Sep 25 2009
Keyword:base added, comment expanded - R. J. Mathar, Aug 29 2010
a(10)-a(14) from Franklin T. Adams-Watters, Apr 10 2011
a(15)-a(30) from Andrew Howroyd, Mar 29 2016
STATUS
approved