cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-16 of 16 results.

A351715 Numbers k such that k and k + 1 are both Lucas-Niven numbers (A351714).

Original entry on oeis.org

1, 2, 3, 6, 7, 10, 11, 29, 39, 47, 57, 80, 123, 129, 134, 152, 159, 170, 176, 199, 206, 245, 279, 326, 384, 387, 398, 404, 521, 531, 543, 560, 579, 615, 644, 651, 684, 755, 843, 849, 854, 872, 879, 890, 896, 944, 1024, 1052, 1064, 1070, 1071, 1095, 1350, 1382
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Examples

			6 is a term since 6 and 7 are both Lucas-Niven numbers: the minimal Lucas representation of 6, A130310(6) = 1001, has 2 1's and 6 is divisible by 2, and the minimal Lucas representation of 7, A130310(7) = 10000, has one 1 and 7 is divisible by 1.
		

Crossrefs

Subsequence of A351714.
A351716 is a subsequence.

Programs

  • Mathematica
    lucasNivenQ[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; Divisible[n, Plus @@ IntegerDigits[Total[2^s], 2]]]; Select[Range[1400], And @@ lucasNivenQ/@{#, #+1} &]

A351716 Starts of runs of 3 consecutive Lucas-Niven numbers (A351714).

Original entry on oeis.org

1, 2, 6, 10, 1070, 4214, 10654, 10730, 13118, 31143, 39830, 43864, 47663, 48184, 50134, 62334, 63510, 79954, 83344, 84006, 89614, 107270, 119224, 119434, 121384, 124586, 124984, 129094, 129843, 148910, 165430, 167760, 168574, 183274, 193144, 198184, 198904, 199870
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Comments

Conjecture: 1 is the only start of a run of 4 consecutive Lucas-Niven numbers (checked up to 10^9).

Examples

			6 is a term since 6, 7 and 8 are all Lucas-Niven numbers: the minimal Lucas representation of 6, A130310(6) = 1001, has 2 1's and 6 is divisible by 2, the minimal Lucas representation of 7, A130310(7) = 10000, has one 1 and 7 is divisible by 1, and the minimal Lucas representation of 8, A130310(8) = 10010, has 2 1's and 8 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    lucasNivenQ[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; Divisible[n, Plus @@ IntegerDigits[Total[2^s], 2]]]; seq[count_, nConsec_] := Module[{luc = lucasNivenQ /@ Range[nConsec], s = {}, c = 0, k = nConsec + 1}, While[c < count, If[And @@ luc, c++; AppendTo[s, k - nConsec]]; luc = Join[Rest[luc], {lucasNivenQ[k]}]; k++]; s]; seq[50, 3]

A351713 Numbers whose binary and minimal Lucas representations are both palindromic.

Original entry on oeis.org

0, 9, 31, 975, 297097, 816867, 4148165871, 152488124529, 1632977901693, 11162529166917, 11925833175477, 3047549778123957, 3894487365191355, 8920885515768255
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Examples

			   n    a(n)       A007088(a(n))                A130310(a(n))
   ----------------------------------------------------------
   1       0                   0                            0
   2       9                1001                        10001
   3      31               11111                     10000001
   4     975          1111001111              100010000010001
   5  297097 1001000100010001001  100001000000101000000100001
		

Crossrefs

Intersection of A006995 and A351712.
Subsequence of A054770.
Similar sequences: A095309, A331193, A331894, A351718.

Programs

  • Mathematica
    lucasPalQ[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; PalindromeQ[IntegerDigits[Total[2^s], 2]]]; Join[{0}, Select[Range[1, 10^6, 2], PalindromeQ[IntegerDigits[#, 2]] && lucasPalQ[#] &]]

A351718 Numbers whose binary and maximal Lucas representations are both palindromic.

Original entry on oeis.org

0, 3, 5, 17, 85, 107, 219, 1161, 1365, 1619, 2047, 4097, 6141, 19801, 25027, 68961, 91213, 134337, 1540157, 1804859, 11877549, 37696497, 44092437, 142710801, 548269377, 3387848595, 4073444175, 8226780335, 31029923047, 64662095631, 67947722943, 126590440407, 2145176968607
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Examples

			The first 10 terms are:
   n   a(n)  A007088(a(n))    A130311(a(n))
   ----------------------------------------
   1     0               0                0
   2     3              11               11
   3     5             101              101
   4    17           10001            11111
   5    85         1010101        101101101
   6   107         1101011        111010111
   7   219        11011011      10110101101
   8  1161     10010001001   11011111111011
   9  1365     10101010101  101010101010101
  10  1619     11001010011  101111010111101
		

Crossrefs

Intersection of A006995 and A351717.

Programs

  • Mathematica
    lazy = Select[IntegerDigits[Range[10^6], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse @ LucasL[Range[0, Length[#] - 1]]] & /@ lazy; s = FromDigits /@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]; Join[{0}, Select[Position[s, _?PalindromeQ] // Flatten, PalindromeQ[IntegerDigits[#, 2]] &]]

A063732 Numbers whose Lucas representation excludes L_0 = 2.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 50, 51, 52, 54, 55, 57, 58, 59, 61, 62, 63, 65, 66, 68, 69, 70, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 86, 87, 88, 90
Offset: 1

Views

Author

Fred Lunnon, Aug 25 2001

Keywords

Comments

From Michel Dekking, Aug 26 2019: (Start)
This sequence is a generalized Beatty sequence. We know that A054770, the sequence of numbers whose Lucas representation includes L_0=2, is equal to A054770(n) = A000201(n) + 2*n - 1 = floor((phi+2)*n) - 1.
One also easily checks that the numbers 3-phi and phi+2 form a Beatty pair. This implies that the sequence with terms floor((3-phi)*n)-1 is the complement of A054770 in the natural numbers 0,1,2,...
It follows that a(n) = 3*n - floor(n*phi) - 2.
(End)

Crossrefs

Cf. A003622, A022342. Complement of A054770.
Partial sums of A003842.
Cf. A130310 (Lucas representation).

Formula

a(n) = floor((3-phi)*n)-1, where phi is the golden mean. - Michel Dekking, Aug 26 2019

A342089 Numbers that have two representations as the sum of distinct non-consecutive Lucas numbers (A000032).

Original entry on oeis.org

5, 12, 16, 23, 30, 34, 41, 45, 52, 59, 63, 70, 77, 81, 88, 92, 99, 106, 110, 117, 121, 128, 135, 139, 146, 153, 157, 164, 168, 175, 182, 186, 193, 200, 204, 211, 215, 222, 229, 233, 240, 244, 251, 258, 262, 269, 276, 280, 287, 291, 298, 305, 309, 316, 320, 327
Offset: 1

Views

Author

Amiram Eldar, Feb 27 2021

Keywords

Comments

Brown (1969) proved that every positive number has a unique representation as a sum of non-consecutive Lucas numbers, if L(0) = 2 and L(2) = 3 do not appear simultaneously in the representation.
Chu et al. (2020) proved that if L(0) and L(2) are allowed to appear simultaneously, then each positive number can have at most two representations. The terms with two representations are listed in this sequence. They found that the number of terms that do not exceed 10^k, for k = 1, 2, ..., are 1, 17, 171, 1708, 17082, 170820, ..., and proved that the asymptotic density of this sequence is 1/(3*phi+1) = 0.1708203932... (A176015 - 1), where phi is the golden ratio (A001622).
A number n appears in the sequence if and only if the coefficient of phi^{-1} in the base-phi expansion of n is 1. Alternatively, the last bit of the n-th term of A341722 is 1. - Jeffrey Shallit, May 03 2023

Examples

			5 is a term since it has two representations: L(0) + L(2) = 2 + 3 and L(1) + L(3) = 1 + 4.
12 is a term since it has two representations: L(1) + L(5) = 1 + 11 and L(0) + L(2) + L(4) = 2 + 3 + 7.
		

Crossrefs

Programs

  • Java
    See David C. Luo's GitHub link.
  • Maple
    L:= [seq(combinat:-fibonacci(n+1)+combinat:-fibonacci(n-1), n=0..40)]:
    f1:= proc(n, m) option remember;
          if n = 0 then return 1 fi;
          if m <= 0 then 0
          elif L[m] <= n then procname(n - L[m],m-2) + procname(n, m-1)
          else procname(n,m-1)
          fi
    end proc:
    filter:= n -> f1(n,ListTools:-BinaryPlace(L,n+1))=2:
    select(filter, [$1..1000]); # Robert Israel, Mar 10 2021
  • Mathematica
    L = Table[Fibonacci[n+1] + Fibonacci[n-1], {n, 0, 40}];
    f1[n_, m_] := f1[n, m] = If[n == 0, Return[1], Which[m <= 0, 0, L[[m]] <= n, f1[n-L[[m]], m-2] + f1[n, m-1], True, f1[n, m-1]]];
    filterQ[n_] := f1[n, FirstPosition[L, b_ /; b > n+1][[1]]-1] == 2;
    Select[Range[1000], filterQ] (* Jean-François Alcover, Aug 27 2022, after Robert Israel *)
Previous Showing 11-16 of 16 results.