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: Jason Zimba

Jason Zimba's wiki page.

Jason Zimba has authored 7 sequences.

A343769 Sorted areas of primitive Heronian triangles for which a rectangle exists with integer dimensions and with perimeter and area equal respectively to the perimeter and area of the triangle.

Original entry on oeis.org

12, 126, 624, 1260, 1800, 2100, 2850, 4536, 5292, 5580, 8820, 9900, 12600, 12642, 14850, 15600, 17640, 19110, 21756, 23400, 24948, 25200, 25536, 28350, 47040, 47304
Offset: 1

Author

Jason Zimba, Apr 28 2021

Keywords

Examples

			a(1) = 12 because 12 is the area of the 5-5-6 triangle, which is the least-area primitive Heronian triangle for which a rectangle exists with integer dimensions (2-by-6) and with perimeter (16) and area (12) equal respectively to the perimeter and area of the triangle.
a(2) = 126 because 126 is the area of the 13-20-21 triangle, which is the second-least-area primitive Heronian triangle for which a rectangle exists with integer dimensions (6-by-21) and with perimeter (54) and area (126) equal respectively to the perimeter and area of the triangle.
		

Crossrefs

Subsequence of A224301.

Programs

  • Mathematica
    (* Adapted from Albert Lau's program for A224301 *)
    AMax = 10000;
    Do[c = p/b;
        a1 = Sqrt[b^2 + c^2 + 2 Sqrt[b^2 c^2 - 4 A^2]];
        a2 = Sqrt[b^2 + c^2 - 2 Sqrt[b^2 c^2 - 4 A^2]];
        If[IntegerQ[a2] && GCD[a2, b, c] == 1 &&
          a1 > a2 >= b && (per = a2 + b + c;
           IntegerQ[(per + Sqrt[per^2 - 16 A])/4]), A // Sow(*{A,a2,b,c}//
         Sow*)];
        If[IntegerQ[a1] &&
          GCD[a1, b, c] == 1 && (per = a1 + b + c;
           IntegerQ[(per + Sqrt[per^2 - 16 A])/4]), A // Sow(*{A,a1,b,c}//
         Sow*)];, {A, 6, AMax, 6}, {p,
         4 A^2 // Divisors //
            Select[#, EvenQ[#] && # >= 2 A &] & // #/2 + 2 A^2/# & //
          Select[#, IntegerQ] &}, {b,
         p // Divisors // Select[#, #^2 >= p &] &}] // Reap // Last // Last
    {a1, a2, c} =.;

A335820 Number of squarefree graphs on n nodes with maximal number of edges.

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 5, 5, 10, 2, 11, 3, 2, 1, 2, 2, 1, 1, 5, 1, 1, 13, 1, 20, 9, 8, 7, 1, 2, 1, 1, 9, 18, 1, 1, 5, 11
Offset: 1

Author

Jason Zimba, Jul 22 2020

Keywords

Comments

Number of squarefree graphs on n nodes with A006855(n) edges.

Examples

			There are 2 squarefree graphs on 10 nodes that have maximal number of edges.
		

Crossrefs

Unlabeled version of A191966.

Extensions

a(22)-a(37) from Brendan McKay, Mar 08 2022

A335979 Number of partitions of n into exactly two parts with no decimal carries.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 7, 9, 12, 14, 17, 19, 22, 24, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 3, 6, 10, 13, 17, 20, 24, 27, 31, 34, 3, 7, 11, 15, 19, 23
Offset: 0

Author

Jason Zimba, Jul 02 2020

Keywords

Comments

a(m) = a(n) if m and n have the same nonzero digits, irrespective of order. For example, a(6044005) = a(45604).

Examples

			a(31) = 3 because there are three partitions of 31 into exactly two parts with no decimal carries: 30 + 1, 21 + 10, and 20 + 11.
a(100) = 0 because every partition of 100 into exactly two parts has at least one decimal carry.
		

Crossrefs

Cf. A088512 (analogous sequence for base 2), A089898.

Programs

  • Mathematica
    Ceiling[(1/2) Times @@ (IntegerDigits[n, 10] + 1)] - 1

Formula

If n has digits n_1, n_2, ..., n_k and all digits n_i are even, then a(n) = (1/2)(n_1 + 1)(n_2 + 1)...(n_k + 1) - 1/2. Otherwise, a(n) = (1/2)(n_1 + 1)(n_2 + 1)...(n_k + 1) - 1. Equivalently, a(n) = ceiling((1/2)(n_1 + 1)(n_2 + 1)...(n_k + 1)) - 1 for all n.
a(n) = ceiling((1/2)*A089898(n)) - 1.

A327361 Minimal denominator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi.

Original entry on oeis.org

1, 14, 113, 1017, 31746, 265381, 1725033, 25510582, 209259755, 1963319607, 13402974518, 313006581566, 2851718461558, 30226875395063, 136308121570117, 1952799169684491, 21208174623389167, 136876735467187340, 1684937174853026414, 10109623049118158484
Offset: 1

Author

Jason Zimba, Sep 03 2019

Keywords

Examples

			The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28.
The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381.
		

References

  • O. Zelenyak, Programming workshop on Turbo Pascal: Tasks, Algorithms and Solutions, Litres, 2018, page 255. (Provides first 8 terms. Also contains similar sequences for sqrt(2) and e.)

Crossrefs

A327360 gives the corresponding numerators.
Cf. A072398/A072399, which gives the best rational approximation to Pi subject to a different constraint.

Programs

  • Mathematica
    (* Given the 8th term, find the 9th term *)
    (* This took twelve-plus hours to run on a laptop *)
    ResultList = {};
    nVal = 9;
    tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *)
    Do[
      CurrentNumerator = i;
      Do[
       CurrentDenominator = j;
       CurrentQuotient = N[CurrentNumerator/CurrentDenominator];
       If[
        Abs[CurrentQuotient - Pi] <= tol,
        ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}]
        ],
       {j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}],
      {i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}];
    DifferenceList =
      Table[
       Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi],
       {i, 1, Length[ResultList]}];
    Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]]

Extensions

a(10)-a(20) from Jon E. Schoenfield, Mar 12 2021

A327360 Minimal numerator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi.

Original entry on oeis.org

3, 44, 355, 3195, 99733, 833719, 5419351, 80143857, 657408909, 6167950454, 42106686282, 983339177173, 8958937768937, 94960529682104, 428224593349304, 6134899525417045, 66627445592888887, 430010946591069243, 5293386250278608690, 31760317501671652140
Offset: 1

Author

Jason Zimba, Sep 03 2019

Keywords

Examples

			The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28. The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381.
		

References

  • O. Zelenyak, Programming workshop on Turbo Pascal: Tasks, Algorithms and Solutions, Litres, 2018, page 255. (Provides first 8 terms. Also contains similar sequences for sqrt(2) and e.)

Crossrefs

A327361 gives the corresponding denominators.
Cf. A072398/A072399, which gives the best rational approximation to Pi subject to a different constraint.

Programs

  • Mathematica
    (* Given the 8th term, find the 9th term *)
    (* This took twelve-plus hours to run on a laptop *)
    ResultList = {};
    nVal = 9;
    tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *)
    Do[
      CurrentNumerator = i;
      Do[
       CurrentDenominator = j;
       CurrentQuotient = N[CurrentNumerator/CurrentDenominator];
       If[
        Abs[CurrentQuotient - Pi] <= tol,
        ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}]
        ],
       {j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}],
      {i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}];
    DifferenceList =
      Table[
       Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi],
       {i, 1, Length[ResultList]}];
    Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]]

Extensions

Terms a(10) and beyond from Jon E. Schoenfield, Mar 11 2021

A316227 Composite numbers k for which no nontrivial divisor shares any digits with k.

Original entry on oeis.org

4, 6, 8, 9, 10, 14, 16, 18, 21, 27, 34, 38, 46, 49, 54, 56, 57, 58, 68, 69, 76, 78, 81, 86, 87, 106, 111, 116, 118, 129, 134, 146, 158, 161, 166, 177, 188, 201, 219, 247, 249, 259, 267, 289, 323, 329, 334, 356, 358, 388, 413, 446, 454, 458, 466, 477, 478, 489
Offset: 1

Author

Jason Zimba, Jun 27 2018

Keywords

Comments

A nontrivial divisor of k means a divisor greater than 1 and less than k.

Examples

			The nontrivial divisors of 54 are 2, 3, 6, 9, 18, and 27, none of which have a digit 5 or 4.
The nontrivial divisors of 248629501 are 337 and 737773.
The nontrivial divisors of 321810649 are 557 and 577757.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local S;
      if isprime(n) then return false fi;
      S:= convert(convert(n,base,10),set);
      andmap(d -> convert(convert(d,base,10),set) intersect S = {}, numtheory:-divisors(n) minus {1,n})
    end proc:
    select(filter, [$4..1000]); # Robert Israel, Jul 22 2018
  • Mathematica
    MaxCheck = 1000; (* modify as desired *)
    ResultList = {};
    Do[
      If[
       Not[PrimeQ[k]] &&
        Intersection[
          Flatten[
           Map[
            IntegerDigits,
            Complement[Divisors[k], {1, k}]
            ]
           ],
          IntegerDigits[k]
          ] == {},
       ResultList = Append[ResultList, k]
       ],
      {k, 2, MaxCheck}];
    ResultList
    (* or *) Select[Range@500, CompositeQ@# && Intersection[ IntegerDigits@#, Flatten@ IntegerDigits@ Most@ Rest@ Divisors@ #] == {} &] (* Giovanni Resta, Jun 27 2018 *)
  • PARI
    isok(n) = {my(d=divisors(n), dd = Set(digits(n))); for (k=2, #d-1, if (#setintersect(Set(digits(d[k])), dd), return (0));); return (1);}
    lista(nn) = {forcomposite(n=1, nn, if (isok(n), print1(n, ", ")););} \\ Michel Marcus, Jul 03 2018

A286742 a(n) minimizes (over the integers) the absolute difference between Pi and x(n) + 1/a(n), where x(n) is Pi truncated at the n-th decimal digit.

Original entry on oeis.org

7, 24, 628, 1687, 10793, 376848, 1530012, 18660270, 278567575, 1695509434, 11136696004, 102111268282, 1260654956982, 10725187563686, 308788493220130, 4193528956200936, 25999253094360135, 118166387818704585, 2161492060929047665, 15963377896404315144
Offset: 1

Author

Jason Zimba, May 13 2017

Keywords

Examples

			3 + 1/7 is closest to Pi in absolute value among numbers of the form 3 + 1/k (k an integer); 3.1 + 1/24 is closest to Pi in absolute value among numbers of the form 3.1 + 1/k (k an integer); 3.14 + 1/628 is closest to Pi in absolute value among numbers of the form 3.14 + 1/k (k an integer).
		

Crossrefs

Cf. A074783.

Programs

  • Mathematica
    Table[
       truncpi = Floor[10^(n - 1)*Pi]/10^(n - 1);
        SortBy[
          {Floor[1/(Pi - truncpi)], Ceiling[1/(Pi - truncpi)]},
          N[Abs[Pi - (truncpi + 1/#)]] &
       ][[1]],
    {n, 1, 20}] (* first 20 terms *)