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.

Showing 1-4 of 4 results.

A286326 Least possible maximum of the two initial terms of a Fibonacci-like sequence containing n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 2, 1, 3, 2, 2, 3, 1, 3, 3, 2, 4, 2, 3, 4, 1, 4, 3, 3, 5, 2, 4, 4, 2, 5, 3, 4, 5, 1, 5, 4, 3, 6, 3, 5, 5, 2, 6, 4, 4, 6, 2, 6, 5, 3, 7, 4, 5, 6, 1, 7, 5, 4, 7, 3, 6, 6, 3, 8, 5, 5, 7, 2, 7, 6, 4, 8, 4, 6, 7, 2, 8, 6, 5, 8, 3, 7, 7, 4, 9, 5
Offset: 0

Views

Author

Rémy Sigrist, May 07 2017

Keywords

Comments

A Fibonacci-like sequence f satisfies f(n+2) = f(n+1) + f(n), and is uniquely identified by its two initial terms f(0) and f(1); here we consider Fibonacci-like sequences with f(0) >= 0 and f(1) >= 0.
This sequence is part of a family of variations of A249783, where we minimize a function g of the initial terms of Fibonacci-like sequences containing n:
- A249783: g(f) = f(0) + f(1),
- A286321: g(f) = f(0) * f(1),
- a: g(f) = max(f(0), f(1)),
- A286327: g(f) = f(0)^2 + f(1)^2.
For any n>0, a(n) <= n (as the Fibonacci-like sequence with initial terms n and 0 contains n).
For any n>0, a(A000045(n)) = 1.
Apparently the same as A097368 for n > 1. - Georg Fischer, Oct 09 2018

Examples

			See illustration of the first terms in Links section.
		

Crossrefs

Programs

  • Mathematica
    {0}~Join~Table[Module[{a = 0, b = 1, s = {}}, While[a <= n, AppendTo[s, Flatten@ NestWhileList[{#2, #1 + #2} & @@ # &, {a, b}, Last@ # < n &]]; If[a + b >= n, a++; b = 1, b++]]; Min@ Map[Max@ #[[1 ;; 2]] &, Select[s, MemberQ[#, n] &]]], {n, 86}] (* Michael De Vlieger, May 10 2017 *)

A286321 Least possible strictly positive product of the two initial terms of a Fibonacci-like sequence containing n.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 2, 1, 3, 4, 2, 6, 1, 3, 6, 4, 4, 2, 6, 5, 1, 8, 3, 9, 10, 4, 12, 4, 2, 15, 6, 9, 5, 1, 10, 8, 3, 6, 9, 20, 10, 4, 7, 12, 4, 12, 2, 8, 15, 6, 14, 16, 5, 18, 1, 16, 20, 8, 18, 3, 6, 19, 9, 24, 20, 10, 28, 4, 7, 30, 12, 32, 4, 12, 35, 2, 8, 14
Offset: 1

Views

Author

Rémy Sigrist, May 07 2017

Keywords

Comments

A Fibonacci-like sequence f satisfies f(n+2) = f(n+1) + f(n), and is uniquely identified by its two initial terms f(0) and f(1); here we consider Fibonacci-like sequences with f(0) > 0 and f(1) > 0.
This sequence is part of a family of variations of A249783, where we minimize a function g of the initial terms of Fibonacci-like sequences containing n:
- A249783: g(f) = f(0) + f(1),
- a: g(f) = f(0) * f(1),
- A286326: g(f) = max(f(0), f(1)),
- A286327: g(f) = f(0)^2 + f(1)^2.
For any n>0, a(n) <= n (as the Fibonacci-like sequence with initial terms n and 1 contains n).
For any n>0, a(A000045(n)) = 1.
For any n>2, a(A000032(n)) = 2.

Examples

			See illustration of the first terms in Links section.
		

Crossrefs

Programs

  • Mathematica
    Table[Module[{a = 0, b = 1, s = {}}, While[a <= n, AppendTo[s, Flatten@ NestWhileList[{#2, #1 + #2} & @@ # &, {a, b}, Last@ # < n &]]; If[a + b >= n, a++; b = 1, b++]]; First@ DeleteCases[#, 0] &@ Union@ Map[Times @@ #[[1 ;; 2]] &, Select[s, MemberQ[#, n] &]]], {n, 78}] (* Michael De Vlieger, May 10 2017 *)

A327194 For any n >= 0: consider the different ways to split the binary representation of n into two (possibly empty) parts, say with value x and y; a(n) is the least possible value of x^2 + y^2.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 5, 10, 1, 2, 5, 10, 9, 10, 13, 18, 1, 2, 5, 10, 17, 26, 29, 34, 9, 10, 13, 18, 25, 34, 45, 58, 1, 2, 5, 10, 17, 26, 37, 50, 25, 26, 29, 34, 41, 50, 61, 74, 9, 10, 13, 18, 25, 34, 45, 58, 49, 50, 53, 58, 65, 74, 85, 98, 1, 2, 5, 10, 17, 26, 37
Offset: 0

Views

Author

Rémy Sigrist, Aug 25 2019

Keywords

Comments

This sequence shares graphical features with A286327.

Examples

			For n=42:
- the binary representation of 42 is "101010",
- there are 7 ways to split it:
   - "" and "101010": x=0 and y=42: 0^2 + 42^2 = 1764,
   - "1" and "01010": x=1 and y=10: 1^2 + 10^2 = 101,
   - "10" and "1010": x=2 and y=10: 2^2 + 10^2 = 104,
   - "101" and "010": x=5 and y=2: 5^2 + 2^2 = 29,
   - "1010" and "10": x=10 and y=2: 10^2 + 2^2 = 104,
   - "10101" and "0": x=21 and y=0: 21^2 + 0^2 = 441,
   - "101010" and "": x=42 and y=0: 42^2 + 0^2 = 1764,
- hence a(42) = 29.
		

Crossrefs

See A327186 for other variants.
Cf. A286327.

Programs

  • Mathematica
    Table[Min[Total[#^2]&/@Table[FromDigits[#,2]&/@TakeDrop[IntegerDigits[n,2],d],{d,0,IntegerLength[n,2]}]],{n,0,80}] (* Harvey P. Dale, Mar 03 2023 *)
  • PARI
    a(n) = my (v=oo, b=binary(n)); for (w=0, #b, v=min(v, fromdigits(b[1..w],2)^2 + fromdigits(b[w+1..#b],2)^2)); v

Formula

a(n) = 1 iff n is a power of 2.

A341474 Let T be the set of sequences {t(k), k >= 0} such that for any k >= 3, t(k) = t(k-1) + t(k-2) + t(k-3); a(n) is the least possible value of t(0)^2 + t(1)^2 + t(2)^2 for an element t of T containing n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 4, 3, 2, 1, 4, 1, 4, 5, 5, 3, 2, 5, 1, 6, 4, 6, 1, 5, 4, 5, 9, 5, 9, 3, 10, 2, 10, 5, 8, 1, 6, 9, 4, 17, 6, 13, 1, 11, 5, 13, 4, 9, 5, 9, 16, 5, 18, 9, 14, 3, 14, 10, 9, 2, 12, 10, 5, 21, 8, 19, 1, 17, 6, 19, 9, 10, 4, 17, 17, 6, 26, 13
Offset: 0

Views

Author

Rémy Sigrist, Feb 13 2021

Keywords

Comments

This sequence is a variant of A286327; here we consider tribonacci-like sequences, there Fibonacci like sequences. The scatterplots of these sequences are similar.

Examples

			The first terms of the elements t of T such that t(0)^2 + t(1)^2 + t(2)^2 <= 4 are:
  t(0)^2+t(1)^2+t(3)^2  t(0)  t(1)  t(2)  t(3)  t(4)  t(5)  t(6)  t(7)  t(8)  t(9)
  --------------------  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----
                     0     0     0     0     0     0     0     0     0     0     0
                     1     0     0     1     1     2     4     7    13    24    44
                     1     0     1     0     1     2     3     6    11    20    37
                     1     1     0     0     1     1     2     4     7    13    24
                     2     0     1     1     2     4     7    13    24    44    81
                     2     1     0     1     2     3     6    11    20    37    68
                     2     1     1     0     2     3     5    10    18    33    61
                     3     1     1     1     3     5     9    17    31    57   105
                     4     0     0     2     2     4     8    14    26    48    88
                     4     0     2     0     2     4     6    12    22    40    74
                     4     2     0     0     2     2     4     8    14    26    48
- so a(0) = 0,
     a(1) = a(2) = a(3) = a(4) = a(6) = a(7) = a(11) = 1,
     a(5) = a(10) = a(18) = 2,
     a(9) = a(17) = 3,
     a(8) = a(12) = a(14) = 4.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = 0 iff n = 0.
a(n) = 1 iff n belongs to A213816.
a(n) <= n^2.
Showing 1-4 of 4 results.