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-6 of 6 results.

A007970 Rhombic numbers.

Original entry on oeis.org

3, 7, 8, 11, 15, 19, 23, 24, 27, 31, 32, 35, 40, 43, 47, 48, 51, 59, 63, 67, 71, 75, 79, 80, 83, 87, 88, 91, 96, 99, 103, 104, 107, 115, 119, 120, 123, 127, 128, 131, 135, 136, 139, 143, 151, 152, 159, 160, 163, 167, 168, 171, 175, 176, 179
Offset: 1

Views

Author

Keywords

Comments

A191856(n) = A007966(a(n)); A191857(n) = A007967(a(n)). - Reinhard Zumkeller, Jun 18 2011
This sequence gives the values d of the Pell equation x^2 - d*y^2 = +1 that have positive fundamental solutions (x0, y0) with odd y0. This was first conjectured and is proved provided Conway's theorem in the link is assumed and the proof of the conjecture stated in A007869, given there in a W. Lang link, is used. - Wolfdieter Lang, Sep 19 2015
For a proof of Conway's theorem on the happy number factorization see the W. Lang link (together with the link given under A007969). - Wolfdieter Lang, Oct 04 2015

Crossrefs

Every number belongs to exactly one of A000290, A007969, A007970.
Cf. A007968.
Subsequence of A000037, A002145 is a subsequence.
A263008 (T numbers), A263009 (U numbers).

Programs

  • Haskell
    a007970 n = a007970_list !! (n-1)
    a007970_list = filter ((== 2) . a007968) [0..]
    -- Reinhard Zumkeller, Oct 11 2015
  • Mathematica
    r[b_, c_] := (red = Reduce[x > 0 && y > 0 && b*x^2 + 2 == c*y^2, {x, y}, Integers] /. C[1] -> 1 // Simplify; If[Head[red] === Or, First[red], red]);
    f[n_] := f[n] = If[! IntegerQ[Sqrt[n]], Catch[Do[{b, c} = bc; If[ (r0 = r[b, c]) =!= False, {x0, y0} = {x, y} /. ToRules[r0]; If[OddQ[x0] && OddQ[y0], Throw[n]]]; If[ (r0 = r[c, b]) =!= False, {x0, y0} = {x, y} /. ToRules[r0]; If[OddQ[x0] && OddQ[y0], Throw[n]]], {bc, Union[Sort[{#, n/#}] & /@ Divisors[n]]} ]]];
    A007970 = Reap[ Table[ If[f[n] =!= Null, Print[f[n]]; Sow[f[n]]], {n, 1, 180}] ][[2, 1]](* Jean-François Alcover, Jun 26 2012 *)

Formula

a(n) = A191856(n)*A191857(n); A007968(a(n))=2. - Reinhard Zumkeller, Jun 18 2011
a(n) is in the sequence if a(n) = D*E with positive integers D and E, such that E*U^2 - D*T^2 = 2 has an integer solution with U*T odd (without loss of generality one may take U and T positive). See the Conway link. D and E are given in A191856 and A191857, respectively. - Wolfdieter Lang, Oct 05 2015

Extensions

159 and 175 inserted by Jean-François Alcover, Jun 26 2012

A007966 First factor in happy factorization of n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 2, 7, 2, 3, 1, 1, 3, 1, 7, 3, 4, 1, 2, 1, 4, 3, 2, 23, 4, 5, 1, 1, 7, 1, 5, 31, 16, 11, 17, 5, 6, 1, 2, 3, 2, 1, 6, 1, 11, 5, 23, 47, 6, 7, 1, 1, 4, 1, 2, 11, 7, 3, 1, 1, 15, 1, 31, 7, 8, 1, 2, 1, 4, 23, 5, 71, 8, 1, 1, 25, 19, 7, 26, 79, 8, 9, 1, 1, 3, 1, 2, 3, 4, 1, 9
Offset: 0

Views

Author

Keywords

Comments

a(n) = n / A007967(n);
a(A007969(n)) = A191854(n); a(A007970(n)) = A191856(n). - Reinhard Zumkeller, Jun 18 2011

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a007966 n = genericIndex a007966_list n
    a007966_list = map fst hCouples
    -- Pairs hCouples are defined in A007968.
    -- Reinhard Zumkeller, Oct 11 2015
  • Mathematica
    r[b_, c_, d_] := (red = Reduce[x > 0 && y > 0 && b*x^2 + d == c*y^2, {x, y}, Integers] /. C[1] -> 1 // Simplify; If[Head[red] === Or, red[[1]], red]); f[n_] := f[n] = If[IntegerQ[rn = Sqrt[n]], {0, rn, rn, rn, rn}, Catch[Do[b = bc[[1]]; c = bc[[2]]; If[ c > 1 && (r0 = r[b, c, 1]) =!= False, rr = ToRules[r0]; x0 = x /. rr; y0 = y /. rr; Throw[{1, b, c, x0, y0}]]; If[ b > 1 && (r0 = r[c, b, 1]) =!= False, rr = ToRules[r0]; x0 = x /. rr; y0 = y /. rr; Throw[{1, c, b, x0, y0}]]; If[ (r0 = r[b, c, 2]) =!= False, rr = ToRules[r0]; x0 = x /. rr; y0 = y /. rr; If[OddQ[x0] && OddQ[y0], Throw[{2, b, c, x0, y0}]]]; If[ (r0 = r[c, b, 2]) =!= False, rr = ToRules[r0]; x0 = x /. rr; y0 = y /. rr; If[OddQ[x0] && OddQ[y0], Throw[{2, c, b, x0, y0}]]]; , {bc, Union[Sort[{#, n/#}] & /@ Divisors[n]]} ]]]; a[n_] := f[n][[2]]; A007966 = Table[Print[a[n]]; a[n], {n, 0, 90}] (* Jean-François Alcover, Jun 25 2012 *)

A191857 Second factor in happy factorization of n-th rhombic number.

Original entry on oeis.org

3, 1, 4, 11, 5, 19, 1, 6, 27, 1, 2, 7, 20, 43, 1, 8, 51, 59, 9, 67, 1, 3, 1, 10, 83, 29, 22, 7, 2, 11, 1, 52, 107, 23, 1, 12, 123, 1, 2, 131, 5, 4, 139, 13, 1, 38, 53, 2, 163, 1, 14, 171, 25, 8, 179, 187, 1, 2, 15, 1, 100, 26, 211, 5, 54, 3, 1, 16, 227, 77
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 18 2011

Keywords

Comments

a(n) = A007967(A007970(n)) = A007970(n) / A191856(n);
(A191856(n), a(n)) is a 2-happy couple;
notation: E in the Conway link.

Crossrefs

Programs

Extensions

Wrong formula removed (thanks to Wolfdieter Lang, who pointed this out), by Reinhard Zumkeller, Oct 11 2015

A263008 First member T0(n) of the smallest positive pair (T0(n), U0(n)) for the n-th 2-happy number couple (D(n), E(n)).

Original entry on oeis.org

1, 1, 1, 3, 1, 13, 1, 1, 5, 7, 1, 1, 3, 59, 1, 1, 7, 23, 1, 221, 7, 1, 1, 1, 9, 3, 7, 11, 1, 1, 47, 5, 31, 15, 1, 1, 11, 193, 3, 103, 3, 1, 8807, 1, 3383, 3, 21, 3, 8005, 1, 1, 13, 17, 3, 2047
Offset: 1

Views

Author

Wolfdieter Lang, Oct 29 2015

Keywords

Comments

The 2-happy numbers D(n)*E(n) are given in A007970(n) (called rhombic numbers in the Conway paper). D(n) = A191856(n), E(n) = A191857(n). Here the corresponding smallest positive numbers satisfying E(n)*U(n)^2 - D(n)*T(n)^2 = +2, n >= 1, with odd U(n) and T(n) are given as T0(n) = a(n) and U0(n) = A263009(n).
In the W. Lang link the first U0(n) and T0(n) numbers are given in the Table for d(n) = A007970(n), n >= 1.
In the Zumkeller link "Initial Happy Factorization Data" given in A191860 the a(n) = T0(n) numbers appear for the t = 2 rows in column v.

Examples

			n = 6: 2-happy number A007970(6) = 19 = 1*19 = A191856(6)*A191857(6). 19*A263009(6)^2 - 1*a(6)^2 = 19*3^2 - 1*13^2 = +2. This is the smallest positive solution for the given 2-happy couple (A191856(n), A191857(n)).
		

Crossrefs

Formula

A191857(n)*A263009(n)^2 - A191856(n)*a(n)^2 = +2, and a(n) with A263009(n) is the smallest positive solution for the given 2-happy couple (A191856(n), A191857(n)).

A263009 Second member U0(n) of the smallest positive pair (T0(n), U0(n)) for the n-th 2-happy number couple (D(n), E(n)).

Original entry on oeis.org

1, 3, 1, 1, 1, 3, 5, 1, 1, 39, 3, 1, 1, 9, 7, 1, 1, 3, 1, 27, 59, 3, 9, 1, 1, 1, 3, 15, 5, 1, 477, 1, 3, 7, 11, 1, 1, 2175, 17, 9, 7, 3, 747, 1, 41571, 1, 5, 19, 627, 13, 1, 1, 9, 5, 153
Offset: 1

Views

Author

Wolfdieter Lang, Oct 29 2015

Keywords

Comments

See A263008. E(n)*a(n)^2 - D(n)*A263008(n)^2 = +2, n >= 1, with the 2-happy couple (D(n), E(n)) = (A191856(n), A191857(n)). The 2-happy numbers D(n)*E(n) are given by A007970(n).
In the Zumkeller link "Initial Happy Factorization Data" given in A191860 the a(n) = U0(n) numbers appear for the t = 2 rows in column w.

Examples

			n = 4: 2-happy number A007970(4) = 11 = 1*11 =
  A191856(4)*A191857(4). 11*a(4)^2 - 1*A263008(4)^2 = 11*1^2 - 1*3^2 = +2. This is the smallest positive solution for given (D, E) = (1, 11).
		

Crossrefs

Formula

A191857(n)*a(n)^2 - A191856(n)*A263008(n)^2 = +2, and A263008(n) with a(n) is the smallest positive
solution for the given 1-happy couple (A191856(n), A191857(n)).

A262324 Conway's triangle of "happy factorizations" (flattened).

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 3, 2, 2, 1, 5, 2, 3, 7, 1, 2, 4, 3, 3, 1, 10, 1, 11, 3, 4, 1, 13, 7, 2, 3, 5, 4, 4, 1, 17, 2, 9, 1, 19, 4, 5, 3, 7, 2, 11, 23, 1, 4, 6, 5, 5, 1, 26, 1, 27, 7, 4, 1, 29, 5, 6, 31, 1, 16, 2, 11, 3, 17, 2, 5, 7, 6, 6, 1, 37, 2, 19, 3, 13, 2, 20, 1, 41, 6, 7, 1, 43, 11, 4, 5, 9, 23, 2, 47, 1, 6, 8, 7, 7
Offset: 0

Views

Author

Jean-François Alcover, Sep 18 2015

Keywords

Comments

Conway's triangle is listed by increasing couple products, with duplicate squares removed.

Examples

			Triangle begins:
{0,0},
{1,1},
{1,2},   {1,3},  {2,2},
{1,5},   {2,3},  {7,1},  {2,4}, {3,3},
{1,10}, {1,11},  {3,4}, {1,13}, {7,2},  {3,5},  {4,4},
{1,17},  {2,9}, {1,19},  {4,5}, {3,7}, {2,11}, {23,1}, {4,6}, {5,5},
...
The original triangle (adapted and truncated):
                           ...
                      5^2  ...
                 4^2  1*26 ...
            3^2  1*17 1*27 ...
        2^2 1*10 2*9  7*4  ...
    1^2 1*5 1*11 1*19 1*29 ...
0^2 1*2 2*3 3*4  4*5  5*6  ...
1^2 1*3 7*1 1*13 3*7  31*1 ...
    2^2 2*4 7*2  2*11 16*2 ...
        3^2 3*5  23*1 11*3 ...
            4^2  4*6  17*2 ...
                 5^2  5*7  ...
                      6^2  ...
                           ...
		

Crossrefs

Programs

  • Mathematica
    f[0] = {0, 0}; f[32] = {16, 2}(* to speed up *); f[n_] := Do[c = n/b; If[b == c, Return[{b, b}]]; r1 = Reduce[r >= 0 && s >= 0 && c > 1 && b*r^2 + 1 == c*s^2, {r, s}, Integers]; If[r1 =!= False, Return[{b, c}]]; r2 = Reduce[r >= 0 && s >= 0 && r == 2x + 1 && s == 2y + 1 && b*r^2 + 2 == c *s^2, {r, s, x, y}, Integers]; If[r2 =!= False, Return[{b, c}]], {b, Divisors[n]}]; Table[Print["f(", n, ") = ", fn = f[n]]; fn, {n, 0, 49}] // Flatten
Showing 1-6 of 6 results.