login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309616 a(n) is the number of ways to represent 2*n in the decibinary system. 0

%I #38 Mar 08 2024 23:11:24

%S 1,2,4,6,10,13,18,22,30,36,45,52,64,72,84,93,110,122,140,154,177,192,

%T 214,230,258,277,304,324,356,376,405,426,464,490,528,557,604,634,678,

%U 710,765,802,854,892,952,989,1042,1080,1146,1190,1253,1300,1374,1420,1486,1533,1612,1664

%N a(n) is the number of ways to represent 2*n in the decibinary system.

%C It appears that a(n) is the number of decibinary numbers that can be constructed to represent the decimal numbers 2n-2 and 2n-1. To make this more clear let's consider n = 5: a(5) = 10 means that there are 10 decibinary numbers that represent the decimal numbers 2*5 - 2 = 8 and 2*5 - 1 = 9.

%C Furthermore, a(n) is the number of k such that A028897(k)=2*n.

%H HackerRank, <a href="https://www.hackerrank.com/challenges/decibinary-numbers/problem">Decibinary Numbers</a>.

%F a(1) = 1. a(n) = a(n-1) + a(ceiling(n/2)) if 1 < n <= 5.

%F Conjecture: a(n) = a(n-1) + a(ceiling(n/2)) - a(ceiling((n-5)/2)) if n > 5.

%F I think this sequence is closely related to the 10th binary partition function. The only difference is that every second number is omitted. At the moment, the 10th binary partition function is not in the OEIS. However, my experiments strongly suggest that the 10th binary partition function would indeed look like 1, 1, 2, 2, 4, 4, 6, 6, 10, 10, 13, 13, ...

%e a(1) = 1.

%e a(2) = a(2-1) + a(ceiling(2/2)) = a(1) + a(1) = 1 + 1 = 2.

%e a(3) = a(3-1) + a(ceiling(3/2)) = a(2) + a(2) = 2 + 2 = 4.

%e a(4) = a(4-1) + a(ceiling(4/2)) = a(3) + a(2) = 4 + 2 = 6.

%e a(5) = a(5-1) + a(ceiling(5/2)) = a(4) + a(3) = 6 + 4 = 10.

%e a(6) = a(6-1) + a(ceiling(6/2)) - a(ceiling((6-5)/2)) = a(5) + a(3) - a(1) = 10 + 4 - 1 = 13.

%e a(7) = a(7-1) + a(ceiling(7/2)) - a(ceiling((7-5)/2)) = a(6) + a(4) - a(1) = 13 + 6 - 1 = 18.

%e a(8) = a(8-1) + a(ceiling(8/2)) - a(ceiling((8-5)/2)) = a(7) + a(4) - a(2) = 18 + 6 - 2 = 22.

%e a(9) = a(9-1) + a(ceiling(9/2)) - a(ceiling((9-5)/2)) = a(8) + a(5) - a(2) = 22 + 10 - 2 = 30.

%e a(10) = a(10-1) + a(ceiling(10/2)) - a(ceiling((10-5)/2)) = a(9) + a(5) - a(3) = 30 + 10 - 4 = 36.

%t Nest[Append[#1, #1[[-1]] + #1[[Ceiling[#2/2] ]] - If[#2 > 5, #1[[Ceiling[(#2 - 5)/2] ]], 0 ]] & @@ {#, Length@ # + 1} &, {1}, 57] (* _Michael De Vlieger_, Sep 29 2019 *)

%o (C++) int a(int n) {

%o std::vector<int> seq;

%o int a = 1;

%o seq.push_back(a);

%o for (int i = 1; i < n; i++) {

%o a += seq.at(i / 2);

%o a -= (i >= 5) ? seq.at((i - 5) / 2) : 0;

%o seq.push_back(a);

%o }

%o return seq.back();

%o }

%Y Cf. A007728: superseeker found that the deltas of the sequence a(n+1) - a(n) match transformations of the original query.

%Y Cf. A028897.

%K nonn,base

%O 0,2

%A _Jonas Hollm_, Aug 10 2019

%E Name corrected by _Rémy Sigrist_, Oct 15 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 13:51 EDT 2024. Contains 374318 sequences. (Running on oeis4.)