OFFSET
1,2
COMMENTS
Form a sequence of French words as follows: look to the left, towards the beginning of the sequence and write down the number of vowels you see; repeat; then replace the words by the corresponding numbers.
The sequence of words is: zero, deux, quatre, sept, huit, dix, onze, treize, seize, ...
Hyphens, accents and spaces are not counted.
REFERENCES
E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
EXAMPLE
The second word is "deux" (and so a(2)=2 for the 'e' and the 'u'), because at the end of the first word ("zéro") we can see two vowels ('e' and 'o') to the left.
PROG
(PARI) a(n)={ n>1 || return; #select(Vec(French(n=a(n-1))), x->setsearch(Vec("aeiou"), x))+n } /* see A167507 for French() */
/* Version with memoization for better performance when n >> 100: */
A139212(n)={ type(a139212)!="t_VEC" && a139212=[];
n > #a139212 && a139212=concat( a139212, vector(n-#a139212));
(a139212[n] || n==1) && return(a139212[n]);
a139212[n]=/*up to here only memoization, could be omitted*/
#select(Vec(French(A139212(n-1))), x->setsearch(Vec("aeiou"), x))) + A139212(n-1) } \\ M. F. Hasler, Sep 29 2011
CROSSREFS
KEYWORD
nonn,word,easy
AUTHOR
N. J. A. Sloane (based on Angelini's article), Jun 08 2008
EXTENSIONS
Fixed offset (according to example) and typo in example. M. F. Hasler, Sep 29 2011
STATUS
approved