login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007966 First factor in happy factorization of n. 9
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

a(n) = n / A007967(n);

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

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..300

J. H. Conway, On Happy Factorizations, J. Integer Sequences, Vol. 1, 1998, #1.

Initial Happy Factorization Data

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 *)

PROG

(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

CROSSREFS

Cf. A191914.

Cf. A007968, A007969, A007970, A191854, A191856.

Sequence in context: A131057 A051852 A054495 * A224609 A278710 A011241

Adjacent sequences:  A007963 A007964 A007965 * A007967 A007968 A007969

KEYWORD

nonn

AUTHOR

J. H. Conway

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified October 20 05:42 EDT 2017. Contains 293601 sequences.