%I A137822
%S A137822 1,3,2,7,2,3,1,21,2,3,1,8,1,3,2,61,2,3,1,8,1,3,2,21,1,3,2,7,2,3,1,183,
2,
%T A137822 3,1,8,1,3,2,21,1,3,2,7,2,3,1,62,1,3,2,7,2,3,1,21,2,3,1,8,1,3,2,547,2,
3,
%U A137822 1,8,1,3,2,21,1,3,2,7,2,3,1,62,1,3,2,7,2,3,1,21,2,3,1,8,1,3,2,183,1,3,
2
%N A137822 First differences of A137821 (numbers such that sum( Catalan(k), k=1..2n)
= 0 (mod 3)).
%C A137822 For the initial term, we use A137821(0)=0 (cf. formula).
%C A137822 Sequence A122983 lists record values of this one, which occur at index
2^j (cf. formula). The fact that these values roughly grow by a factor
3 is explained by the fact that these values are given as the sum
of all preceding terms (up to +1 or +2 according to the parity of
j, cf. formula).
%C A137822 The only values occurring in this sequence are { 1, 2, 3, 7, 8, 21, 61,
62, 183, 547, 548, 1641,... } = A137823, consisting of the record
values a(2^j) and, for every other one of these (i.e. for even j),
its successor a(2^j)+1, occurring first as a(3*2^j).
%C A137822 The remarkably simple sequence A137824 (= 1,3,2, 4,12,8,...: pattern
1,3,2 multiplied by powers of 4) gives the index at which the value
A137823(m) first occurs. - M. F. Hasler, Mar 15 2008
%C A137822 The PARI code given here (function A137822(n)) allows one to calculate
hundreds of terms of A107755 in a few microseconds. - M. F. Hasler,
Mar 15 2008
%H A137822 M. F. Hasler, <a href="b137822.txt">Table of n, a(n) for n=1,...,499</
a>.
%F A137822 a(m) = A137821(m)-A137821(m-1), A137821(m)=sum( a(j), j=1..m).
%F A137822 a(2^j) = A122983(j-1) = A137821(2^j-1) + 1 (resp. +2) for j even (resp.
odd).
%F A137822 a(3*2^j) = a(2^j) (resp. = a(2^j)+1) for j odd (resp. j even).
%e A137822 Record values are a(1)=1, a(2)=3, a(4)=7, a(8)=21, a(16)=61, ...
%e A137822 Apart from these values, the only other values occuring in the sequence
are:
%e A137822 2=a(1)+1=a(3*1), 8=a(4)+1=a(3*4), 62=a(16)+1=a(3*16), ...
%o A137822 (PARI) A137822 = D( A137821 ) /* where D(v)=vector(#v-1,i,v[i+1]-v[i])
or D(v)=vecextract(v, "^1")-vecextract(v,"^-1") */
%o A137822 (PARI) n=0; A137822=vector(499,i,{ o=n; if( bitand(i,i-1), while(n++
& s+=binomial(4*n-2, 2*n-1)/(2*n)*(10*n-1)/(2*n+1),),s=Mod(0,3);
n=2*n+1+log(i+.5)\log(2)%2 ); n-o})
%o A137822 (PARI) A137822(n) = { local( L=log(n+.5)\log(2) ); while( n>0 | ((n+=2^L)
& L=log(n+.5)\log(2)), (n-=2^L) | return( 3^(L+1)\4+1 ); (n-=2^(L-1))
| return( 3^L\4+1+L%2 );n<0 & n+=2<<L--);1 } \\ - M. F. Hasler, Mar
15 2008
%Y A137822 Cf. A000108, A107755, A137821-A137824.
%Y A137822 Cf. A122983 (record values of this).
%Y A137822 Sequence in context: A085594 A085587 A071189 this_sequence A099378 A071190
A057020
%Y A137822 Adjacent sequences: A137819 A137820 A137821 this_sequence A137823 A137824
A137825
%K A137822 nonn
%O A137822 1,2
%A A137822 M. F. Hasler (MHasler(AT)univ-ag.fr), Feb 25 2008, revised Mar 15 2008
|