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.

User: Jiri Klepl

Jiri Klepl's wiki page.

Jiri Klepl has authored 3 sequences.

A240849 Quinary happy numbers.

Original entry on oeis.org

1, 5, 7, 11, 19, 23, 25, 27, 33, 35, 41, 43, 49, 51, 55, 79, 81, 83, 91, 93, 95, 99, 103, 109, 115, 119, 121, 123, 125, 127, 133, 135, 141, 143, 149, 153, 157, 159, 161, 165, 169, 171, 173, 175, 181, 189, 193, 197, 201, 203, 205, 209, 213, 215, 217, 219, 221, 223, 229, 231, 233, 237, 241, 243, 245, 249
Offset: 1

Author

Jiri Klepl, Apr 13 2014

Keywords

Comments

Numbers for which the repeated application of the operation "Sum the squares of the digits of the base-5 representation" is trapped by (ends at) the fixed point 1.

Examples

			19 is a quinary happy number because 19=34_5 -> 3^2 + 4^2 = 25 = 100_5 -> 1+0+0 = 1.
		

Crossrefs

Programs

  • Maple
    isA240849 := proc(n)
        t := SqrdB5(n) ;
        tloo := {} ;
        for i from 1 do
            if t = 1 then
                return true;
            end if;
            if t in tloo then
                return false;
            end if;
            tloo := tloo union {t} ;
            t := A276191(t) ;
        end do:
    end proc:
    for n from 1 to 300 do
        if isA240849(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Aug 24 2016
  • Mathematica
    happyQ[n_, b_] := NestWhile[Plus @@ (IntegerDigits[#, b]^2) &, n, UnsameQ, All] == 1; Select[Range[250], happyQ[#, 5] &] (* Amiram Eldar, May 28 2020 *)

A239320 Ternary happy numbers.

Original entry on oeis.org

1, 3, 9, 13, 17, 23, 25, 27, 31, 35, 37, 39, 47, 51, 53, 59, 61, 65, 69, 71, 73, 75, 77, 79, 81, 85, 89, 91, 93, 101, 105, 107, 109, 111, 117, 137, 141, 143, 153, 155, 159, 161, 167, 169, 173, 177, 179, 181, 183, 185, 187, 191, 195, 197, 207, 209, 213
Offset: 1

Author

Jiri Klepl, Apr 13 2014

Keywords

Comments

Numbers where the trajectory of iterated application of A006287 ends at the fixed point 1.

Examples

			13 is a ternary happy number because 13=111_3 -> 1 + 1 + 1 = 3 = 10_3 -> 1 + 0 = 1.
		

Crossrefs

Programs

  • Maple
    isA239320 := proc(n)
        t := A006287(n) ;
        tloo := {} ;
        for i from 1 do
            if t = 1 then
                return true;
            end if;
            if t in tloo then
                return false;
            end if;
            tloo := tloo union {t} ;
            t := A006287(t) ;
        end do:
    end proc:
    for n from 1 to 300 do
        if isA239320(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jun 13 2014
  • Mathematica
    happyQ[n_, b_] := NestWhile[Plus @@ (IntegerDigits[#, b]^2) &, n, UnsameQ, All] == 1; Select[Range[213], happyQ[#, 3] &] (* Amiram Eldar, May 28 2020 *)

A229470 Positions of 2 in decimal expansion of 0.1231232331232332333..., whose definition is given below.

Original entry on oeis.org

2, 5, 7, 11, 13, 16, 21, 23, 26, 30, 36, 38, 41, 45, 50, 57, 59, 62, 66, 71, 77, 85, 87, 90, 94, 99, 105, 112, 121, 123, 126, 130, 135, 141, 148, 156, 166, 168, 171, 175, 180, 186, 193, 201, 210, 221, 223, 226, 230, 235, 241, 248, 256, 265, 275, 287, 289, 292, 296, 301, 307, 314, 322, 331, 341, 352, 365, 367, 370, 374, 379, 385
Offset: 1

Author

Jiri Klepl, Sep 24 2013

Keywords

Comments

0.1231232331232332333... = Sum_{k>=0} 10^(-(k + 3)! / (3! * k!)) * (1 + 10 * Sum_{l=2..k+2} 10^(-(l^2 + l) / 2) * ((10^l - 1) / 3 - 10^(l - 1))).

Programs

  • PARI
    a(n)=sum(k=0,n-1,1+k-binomial(round(sqrt(2+2*k)),2)+issquare(8*k+1)*(sqrtint(1+8*k)+1)/2) /* Ralf Stephan, Oct 09 2013 */

Formula

a((n^2+n+2m-2)/2) = (n^3+6n^2+3m^2+11n-3m+6)/6; n+2>=m>=2.
a(n) = Sum_{k=0..n-1} ( 1 + A002262(k) + A010054(k)*(sqrt(1+8*k)+1)/2 ).

Extensions

Formula corrected by Ralf Stephan, Oct 09 2013