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.

A367606 Comma-successor to n working in base 3, but written in base 10, or -1 if n has no successor.

Original entry on oeis.org

5, 9, 4, -1, 12, 8, 11, 15, 10, 14, 19, 13, 17, 22, 16, 21, 25, 20, 24, 27, 23, -1, 30, 26, 29, 33, 28, 32, 36, 31, 35, 39, 34, 38, 42, 37, 41, 45, 40, 44, 48, 43, 47, 51, 46, 50, 55, 49, 53, 58, 52, 57, 61, 56, 60, 64, 59, 63, 67, 62, 66, 70, 65, 69, 73, 68, 72, 76, 71, 75, 79, 74, 78, 81, 77, -1, 84, 80, 83, 87, 82
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2023

Keywords

Comments

This is a base-3 analog of A367338.
It seems that the indices of the terms equal to -1 are in A168613. - Ivan N. Ianakiev, Dec 12 2023
This is true for A168613(n), n >= 2. See proofs in A367341. - Michael S. Branicky, Dec 15 2023

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a(n):
        b = n + 3*(n%3)
        return next((b+y for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
    print([a(n) for n in range(1, 82)]) # Michael S. Branicky, Dec 11 2023

A367609 Comma-number associated with A367607(n), and written in base 3, or -1 if A367607(n) = -1.

Original entry on oeis.org

11, 21, 1, -1, 21, 2, 11, 21, 1, 11, 22, 1, 11, 22, 1, 12, 22, 2, 12, 21, 2, -1, 21, 2, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 22, 1, 11, 22, 1, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 22, 2, 12, 21, 2, -1, 21, 2, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11, 21, 1, 11
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2023

Keywords

Comments

This is a base-3 analog of A367339.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a(n):
        b = n + 3*(n%3)
        return next((int("".join(map(str, digits(b+y-n, 3)[1:]))) for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Dec 11 2023

A367608 Comma-number associated with A367606(n), but written in base 10, or -1 if A367606(n) = -1.

Original entry on oeis.org

4, 7, 1, -1, 7, 2, 4, 7, 1, 4, 8, 1, 4, 8, 1, 5, 8, 2, 5, 7, 2, -1, 7, 2, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 8, 1, 4, 8, 1, 5, 8, 2, 5, 8, 2, 5, 8, 2, 5, 8, 2, 5, 8, 2, 5, 8, 2, 5, 8, 2, 5, 7, 2, -1, 7, 2, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2023

Keywords

Comments

If n has a comma-successor m (say) in base 3, then a(n) is the comma-number linking n and m, and is equal to m-n; a(n) = -1 if n has no successor. See A367338 for definitions.
This is a base-3 analog of A367339.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a(n):
        b = n + 3*(n%3)
        return next((b+y-n for y in [1, 2] if digits(b+y, 3)[1] == y), -1)
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Dec 11 2023

A367607 Comma-successor to n working in base 3, and written in base 3, or -1 if n has no successor.

Original entry on oeis.org

12, 100, 11, -1, 110, 22, 102, 120, 101, 112, 201, 111, 122, 211, 121, 210, 221, 202, 220, 1000, 212, -1, 1010, 222, 1002, 1020, 1001, 1012, 1100, 1011, 1022, 1110, 1021, 1102, 1120, 1101, 1112, 1200, 1111, 1122, 1210, 1121, 1202, 1220, 1201, 1212, 2001, 1211, 1222, 2011, 1221, 2010, 2021, 2002, 2020, 2101, 2012, 2100
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 2023

Keywords

Comments

This is a base-3 analog of A367338.

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    def a(n):
        b = n + 3*(n%3)
        return next((int("".join(map(str, d3))) for y in [1, 2] if (d3:=digits(b+y, 3)[1:])[0] == y), -1)
    print([a(n) for n in range(1, 61)]) # Michael S. Branicky, Dec 11 2023

A121086 Number of primitive Pythagorean-like triples a^2+b^2=c^2+k for k=3 with 0

Original entry on oeis.org

1, 13, 119, 1219, 12115, 121054, 1210480, 12101765, 121011208, 1210128842
Offset: 1

Views

Author

Tito Piezas III, Aug 11 2006

Keywords

Examples

			a(1)=1 because there is one solution (a,b,c) as (4,6,7) with 0<c<=10^1.
		

Crossrefs

Programs

  • Mathematica
    (* Courtesy of Daniel Lichtblau of Wolfram Research *)
    countTriples[m_, k_] := Module[ {c2, c2odd, total = 0, fax, g}, Do[ c2 = c^2 + k; If[c2 < 2, Continue[]]; c2odd = c2; While[EvenQ[c2odd], c2odd /= 2]; If [c2odd==1, If [OddQ[Log[2,c2]], total++ ]; Continue[]]; If[Mod[c2odd, 4] == 3, Continue[]]; g = GCD[c2odd, 100947]; If[g != 1 && g^2 != GCD[c2odd, 10190296809], Continue[]]; fax = Map[{Mod[ #[[1]],4],#[[2]]}&, FactorInteger[c2odd]]; If[Apply[Or, Map[ #[[1]] == 3 && OddQ[ #[[2]]] &, fax]], Continue []]; fax = Cases[fax, {1,aa_}:>aa+1]; fax = Ceiling[Apply[Times,fax]/2]; total += fax;, {c,m}]; total]

Extensions

First few terms found by Tito Piezas III, James Waldby (j-waldby(AT)pat7.com)
Subsequent terms found by Andrzej Kozlowski (akoz(AT)mimuw.edu.pl), Daniel Lichtblau (danl(AT)wolfram.com)
a(7) from Max Alekseyev, Jul 04 2011
a(8)-a(9) from Lars Blomberg, Dec 22 2015
a(10) from Asif Ahmed, Dec 07 2024

A121088 Number of primitive Pythagorean-like triples a^2+b^2=c^2+k for k=5 with 0

Original entry on oeis.org

1, 20, 202, 2046, 20589, 205489, 2055224, 20551650, 205500435, 2055052214
Offset: 1

Views

Author

Tito Piezas III, Aug 11 2006

Keywords

Examples

			a(1)=1 because there is one solution (a,b,c) as (4,5,6) with 0<c<=10^1.
		

Crossrefs

Programs

  • Mathematica
    (* Courtesy of Daniel Lichtblau of Wolfram Research *)
    countTriples[m_, k_] := Module[ {c2, c2odd, total = 0, fax, g}, Do[ c2 = c^2 + k; If[c2 < 2, Continue[]]; c2odd = c2; While[EvenQ[c2odd], c2odd /= 2]; If [c2odd==1, If [OddQ[Log[2,c2]], total++ ]; Continue[]]; If[Mod[c2odd, 4] == 3, Continue[]]; g = GCD[c2odd, 100947]; If[g != 1 && g^2 != GCD[c2odd, 10190296809], Continue[]]; fax = Map[{Mod[ #[[1]],4],#[[2]]}&, FactorInteger[c2odd]]; If[Apply[Or, Map[ #[[1]] == 3 && OddQ[ #[[2]]] &, fax]], Continue []]; fax = Cases[fax, {1,aa_}:>aa+1]; fax = Ceiling[Apply[Times,fax]/2]; total += fax;, {c,m}]; total]

Extensions

First few terms found by Tito Piezas III, James Waldby (j-waldby(AT)pat7.com)
Subsequent terms found by Andrzej Kozlowski (akoz(AT)mimuw.edu.pl), Daniel Lichtblau (danl(AT)wolfram.com)
a(6) corrected and a(7) added by Max Alekseyev, Jul 04 2011
a(8)-a(9) from Lars Blomberg, Dec 22 2015
a(10) from Asif Ahmed, Dec 07 2024
Showing 1-6 of 6 results.