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.

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

Views

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

A276191 Sum of the squares of the digits of the base-5 representation of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 1, 2, 5, 10, 17, 4, 5, 8, 13, 20, 9, 10, 13, 18, 25, 16, 17, 20, 25, 32, 1, 2, 5, 10, 17, 2, 3, 6, 11, 18, 5, 6, 9, 14, 21, 10, 11, 14, 19, 26, 17, 18, 21, 26, 33, 4, 5, 8, 13, 20, 5, 6, 9, 14, 21, 8, 9, 12, 17, 24, 13, 14, 17, 22, 29, 20, 21, 24, 29, 36, 9, 10, 13, 18, 25, 10
Offset: 0

Views

Author

R. J. Mathar, Aug 24 2016

Keywords

Crossrefs

Cf. A000120 (base 2), A006287 (base 3), A276190 (base 4).

Programs

  • Maple
    A276191 := proc(n)
        local d ;
        add(d^2, d= convert(n, base, 5) );
    end proc:
  • Mathematica
    Table[Total[IntegerDigits[n,5]^2],{n,0,80}] (* Harvey P. Dale, Aug 15 2017 *)

A276190 Sum of the squares of the digits of the base-4 representation of n.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Aug 24 2016

Keywords

Crossrefs

Cf. A000120 (base 2), A006287 (base 3), A276191 (base 5).

Programs

  • Maple
    A276190 := proc(n)
        local d ;
        add(d^2, d= convert(n, base, 4) );
    end proc:
  • Mathematica
    Table[Total[IntegerDigits[n,4]^2 ],{n,0,80}] (* Harvey P. Dale, Jun 26 2022 *)

A375212 a(n) is the product of the leading base-3 digit of n and the sum of the squares of its base-3 digits.

Original entry on oeis.org

1, 8, 1, 2, 5, 8, 10, 16, 1, 2, 5, 2, 3, 6, 5, 6, 9, 8, 10, 16, 10, 12, 18, 16, 18, 24, 1, 2, 5, 2, 3, 6, 5, 6, 9, 2, 3, 6, 3, 4, 7, 6, 7, 10, 5, 6, 9, 6, 7, 10, 9, 10, 13, 8, 10, 16, 10, 12, 18, 16, 18, 24, 10, 12, 18, 12, 14, 20, 18, 20, 26, 16, 18, 24, 18, 20
Offset: 1

Views

Author

N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 16 2024

Keywords

Crossrefs

A079495 Numbers k such that the sum of the squares of the digits of k in base 3 is 0 (mod 3).

Original entry on oeis.org

0, 13, 14, 16, 17, 22, 23, 25, 26, 31, 32, 34, 35, 37, 38, 39, 42, 46, 47, 48, 51, 58, 59, 61, 62, 64, 65, 66, 69, 73, 74, 75, 78, 85, 86, 88, 89, 91, 92, 93, 96, 100, 101, 102, 105, 109, 110, 111, 114, 117, 126, 136, 137, 138, 141, 144, 153, 166, 167, 169, 170, 172, 173
Offset: 1

Views

Author

Carlos Alves, Jan 20 2003

Keywords

Comments

In base 2 this gives the "Evil Numbers" (cf. A001969) and slope 2. One may conjecture that in base b the asymptotic slope will be b and might suspect asymptotic density 1/b for each result (mod b). For nonprime b larger variations occur and "very big" numbers must be considered to believe in the conjecture (1 million or more...). (Related to A006287, here mod b is considered)

Examples

			59 is a member because 59 = 2013_3 and 2^2+0^2+1^2+1^2 = 6 = 0 (mod 3).
		

Crossrefs

Programs

  • Mathematica
    Ev = Function[{b, x}, vx = IntegerDigits[x, b]; Mod[vx.vx, b]]; Seq = Function[{b, n}, Flatten[Position[Table[Ev[b, k], {k, 1, n}], 0]]]; Seq[3, 1000]

Extensions

Revised by Sean A. Irvine, Aug 17 2025

A377082 a(0) = 1, a(1) = 3, a(2) = 13; for n >= 2, a(n+1) = 2*3^((a(n)-1)/4) - 1.

Original entry on oeis.org

1, 3, 13, 53, 3188645
Offset: 0

Views

Author

N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 15 2024

Keywords

Comments

The next term is too large to include.
a(n) is the least positive integer that requires n steps to reach 1 under iteration of the sum of squares of digits function in base 3 (A006287).
a(n) is also the least positive integer that requires n steps to reach 1 under iteration of the map A375212.

Crossrefs

Showing 1-6 of 6 results.