is this sequence interesting?
Peter Pein
petsie at dordos.net
Sun Mar 30 04:42:40 CEST 2008
Dear Seq-fans,
let t(k)=k*(k+1)/2 be the k-th triangular number and write n>=2 as difference
of two positive triangular numbers: n = t(k) - t(j).
Now define a(n) as the minimal k needed for the minuend:
a(n) := min(k > 0: there exists j>0 with n = t(k)-t(j) )
example:
a(30)=8, because 30 = t(30) - t(29)
= t(11) - t( 8)
= t( 9) - t( 5)
= t( 8) - t( 3)
and t(8) is the smallest minuend.
The sequence starts (with offset 2,1):
2, 3, 4, 3, 6, 4, 8, 4, 10,
6, 5, 7, 5, 6, 16, 9, 6, 10, 6,
8, 7, 12, 9, 7, 8, 7, 28, 15, 8,
16, 32, 8, 10, 8, 13, 19, 11, 9, 10,
21, 9, 22, 9, 10, 13, 24, 17, 10, 12,
11, 10, 27, 10, 13, 11, 12, 16, 30, 11,
31, 17, 11, 64, 11, 18, 34, 12, 14, 13,
36, 12, 37, 20, 12, 13, 12, 21, 40, 18,
13, 22, 42, 14, 13, 23, 17, 13, 45, 13,
16, 15, 18, 25, 14, 33, 49, 17, 14, 16
Mathematica:
triadiff[n_] := Block[{c1, c2, k2, d = Divisors[n]},
c2 = d - 1;
c1 = (Reverse[d] - 7 - 2*c2)/4;
k2 = Pick[4 + 2*(c1 + c2), (#1 >= 0 && IntegerQ[#1] & ) /@ c1];
c1 = (Reverse[d] - 5 - 2*c2)/4;
k2 = {k2, Pick[3 + 2*(c1 + c2), (#1 >= 0 && IntegerQ[#1] & ) /@ c1]};
c2 = Cases[(d - 1)/2, _Integer];
c1 = (n/(1 + 2*c2) - 3 - c2)/2;
k2 = {k2, Pick[3 + 2*(c1 + c2), (#1 >= 0 && IntegerQ[#1] & ) /@ c1]};
c1 = (n/(1 + 2*c2) - 2 - c2)/2;
k2 = {k2, Pick[2 + 2*(c1 + c2), (#1 >= 0 && IntegerQ[#1] & ) /@ c1]};
Min[k2]
]
triadiff /@ Range[2, 30]
--> {2, 3, 4, 3, 6, 4, 8, 4, 10, 6, 5, 7, 5, 6, 16, 9, 6, 10, 6, 8, 7, 12, 9,
7, 8, 7, 28, 15, 8}
Superseeker did not find any similarity with existing sequences in the EIS.
If you think it is worth to be kept, I'll be glad to enter it into the
web-form during the next days.
Please correct me if my language is once again unclear or wrong and/or if you
find any errors in the above!
Thank you!
Peter
More information about the SeqFan
mailing list