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: Joseph C. Y. Wong

Joseph C. Y. Wong's wiki page.

Joseph C. Y. Wong has authored 8 sequences.

A371473 a(1) = 1; for n>1, if a(n-1) is squarefree, a(n) = a(n-1) + n, otherwise a(n) = squarefree kernel of a(n-1).

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 14, 23, 33, 44, 22, 35, 49, 7, 23, 40, 10, 29, 49, 7, 29, 52, 26, 51, 77, 104, 26, 55, 85, 116, 58, 91, 125, 5, 41, 78, 116, 58, 98, 14, 56, 14, 58, 103, 149, 196, 14, 63, 21, 72, 6, 59, 113, 168, 42, 99, 33, 92, 46
Offset: 1

Author

Joseph C. Y. Wong, Mar 24 2024

Keywords

Comments

Inspired by Recaman's sequence A005132.
Some nonsquarefree numbers will not appear in this sequence. However, I conjecture that all squarefree numbers will appear. First occurrence of 2 is at a(766) = 2.

Examples

			a(1) = 1 is squarefree, so a(2) = a(1) + 2 = 3.
a(7) = 28 = 2*2*7 is not squarefree, so a(8) = 2*7 = 14.
		

Crossrefs

Programs

  • Mathematica
    rad[n_]:=Product[Part[First/@FactorInteger[n],i],{i,Length[FactorInteger[n]]}]; a[1]=1; a[n_]:=If[SquareFreeQ[a[n-1]],a[n-1]+n,rad[a[n-1]]]; Array[a,60] (* Stefano Spezia, Mar 26 2024 *)
  • PARI
    lista(nn) = my(v = vector(nn)); v[1] = 1; for (n=2, nn, if (issquarefree(v[n-1]), v[n] = v[n-1]+n, v[n] = factorback(factor(v[n-1])[,1]));); v; \\ Michel Marcus, Mar 26 2024
  • Python
    from numpy import prod
    def primefact(a):
      factors = []
      d = 2
      while a > 1:
        while a % d == 0:
          factors.append(d)
          a /= d
        d = d + 1
      return factors
    def squarefree(a):
      return sorted(list(set(primefact(a)))) == sorted(primefact(a))
    sequence = [1]
    a = 1
    for n in range(1, 1001):
      if not squarefree(a):
        a = prod(list(set(primefact(a))))
      else:
        a += n+1
      sequence.append(a)
    print(sequence)
    

A357515 Smallest positive integer that doubles when the n rightmost digits are shifted to the left end.

Original entry on oeis.org

105263157894736842, 100502512562814070351758793969849246231155778894472361809045226130653266331658291457286432160804020
Offset: 1

Author

Joseph C. Y. Wong, Oct 01 2022

Keywords

Comments

a(n) with n>=3 is too large to be written in data.
The following is a method for finding a(n): Let n be the number of digits shifted, and let m be the smallest positive integer such that 10^m = 2 mod 2*10^n-1. We then look for the smallest positive b that is an n+d digit number and satisfies b = c(10^n-2)/(2*10^d-1), where c is a positive integer. Then a(n) = c(10^n-2)/(2*10^d-1)*10^n+c.

Examples

			a(1) = 105263157894736842 because shifting the 1 rightmost digit to the left end gives 210526315789473684 which is double a(1).
		

Crossrefs

A356663 Number of ways to create an angle excess of n degrees using 3 distinct regular polygons with integral internal angles.

Original entry on oeis.org

0, 1, 3, 1, 3, 5, 1, 3, 4, 5, 2, 7, 2, 5, 6, 4, 2, 6, 2, 4, 5, 4, 2, 5, 4, 4, 6, 5, 2, 7, 2, 5, 6, 4, 6, 7, 4, 6, 9, 7, 5, 9, 6, 9, 9, 8, 6, 10, 6, 7, 8, 6, 6, 8, 6, 5, 7, 6, 4, 10, 3, 7, 7, 7, 7, 10, 6, 6, 10, 9, 7, 9, 6, 9, 11, 10, 7, 10
Offset: 1

Author

Joseph C. Y. Wong, Aug 21 2022

Keywords

Comments

a(n) is the number of positive integer triples (a, b, c) (not including permutations) and with a, b, c distinct that satisfy n+360 = (a-2)*180/a + (b-2)*180/b + (c-2)*180/c.
For n >= 175, a(n) = 0. This can be proved. The maximum sum of 3 integral internal angle is of a 360-gon, a 180-gon and a 120-gon with internal angles 179, 178 and 177 degrees respectively. Therefore 179+178+177-360 = 174 degrees is the maximum possible angle excess.

Examples

			For n = 1, there are no possible ways to create an angle excess of 1 degree therefore a(1) = 0.
For n = 3, there are 3 possible ways to create an angle excess of 3 degrees. (3-gon, 8-gon, 30-gon), (4-gon, 5-gon, 24-gon), (5-gon, 6-gon, 8-gon).
		

Crossrefs

Cf. A356444 (where polygons do not have to be distinct).

Programs

  • Python
    import itertools
    def subs(l):
        res = []
        for combo in itertools.combinations(l, 3):
          res.append(list(combo))
        return res
    l = [3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360] # Number of sides of polygons with an integral internal angle
    for n in range(1, 200):
      k = 0
      for i in subs(l):
        if n + 360 == (i[0] - 2)*180/i[0] + (i[1] - 2)*180/i[1] + (i[2] - 2)*180/i[2]:
          k += 1
      print(k)

A356444 Number of ways to create an angle excess of n degrees using 3 regular polygons with integral internal angles.

Original entry on oeis.org

0, 1, 3, 1, 3, 6, 1, 3, 4, 6, 2, 9, 2, 5, 7, 5, 2, 9, 2, 6, 6, 4, 2, 8, 4, 5, 7, 7, 2, 12, 3, 6, 7, 5, 7, 10, 4, 6, 9, 10, 5, 12, 6, 10, 11, 8, 6, 14, 6, 11, 9, 8, 6, 12, 8, 7, 8, 8, 5, 15, 3, 7, 8, 8, 7, 12, 6, 8, 10, 12, 7, 14, 6, 10, 13
Offset: 1

Author

Joseph C. Y. Wong, Aug 21 2022

Keywords

Comments

a(n) is the number of positive integer triples (a, b, c) (not including permutations) that satisfy n+360 = (a-2)*180/a + (b-2)*180/b + (c-2)*180/c.
For n >= 178, a(n) = 0. This can be proved. The maximum integral internal angle is of a 360-gon with internal angle 179 degrees. Therefore 179*3-360 = 177 degrees is the maximum possible angle excess.

Examples

			For n = 1, there are no possible ways to create an angle excess of 1 degree therefore a(1) = 0.
For n = 3, there are 3 possible ways to create an angle excess of 3 degrees. (3-gon, 8-gon, 30-gon), (4-gon, 5-gon, 24-gon), (5-gon, 6-gon, 8-gon).
		

Crossrefs

Cf. A356663 (where distinct polygons are allowed).

Programs

  • Python
    import itertools
    def subs(l):
        res = []
        for combo in itertools.combinations_with_replacement(l, 3):
          res.append(list(combo))
        return res
    l = [3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360] # Number of sides of polygons with an integral internal angle
    for n in range(1, 200):
      k = 0
      for i in subs(l):
        if n + 360 == (i[0] - 2)*180/i[0] + (i[1] - 2)*180/i[1] + (i[2] - 2)*180/i[2]:
          k += 1
      print(k)

A350013 Number of integer-sided triangles with one side having length n and an adjacent angle of 60 degrees.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 3, 4, 3, 3, 3, 2, 3, 3, 7, 6, 3, 3, 3, 3, 7, 3, 3, 7, 5, 3, 4, 3, 3, 7, 3, 8, 6, 3, 10, 3, 3, 3, 6, 11, 3, 7, 3, 3, 10, 3, 3, 12, 5, 5, 6, 3, 3, 4, 10, 10, 6, 3, 3, 7, 3, 3, 10, 10, 10, 6, 3, 3, 6, 10, 3, 10, 3, 3, 11, 3, 10, 6, 3, 18, 5, 3, 3, 7, 9, 3, 6, 10, 3, 10, 10
Offset: 1

Author

Joseph C. Y. Wong, Dec 08 2021

Keywords

Comments

All terms are greater than or equal to 1 because a triangle with side lengths {n, n, n} is equilateral and has an adjacent angle of 60 degrees.
Number of possible integer solutions to the equation n^2 + x^2 - nx = y^2.
x <= n^2 and y <= n^2. - Seiichi Manyama, Dec 09 2021
From David A. Corneth, Dec 10 2021: (Start)
Solving n^2 + x^2 - nx = y^2 for x using the quadratic formula gives x = (n +- sqrt(4*y^2 - 3*n^2)) / 2.
So we need sqrt(4*y^2 - 3*n^2) to be an integer, say k, i.e., sqrt(4*y^2 - 3*n^2) = k.
Squaring gives 4*y^2 - 3*n^2 = k^2, i.e., (2y - k)*(2y + k) = 4*y^2 - k^2 = 3*n^2
Checking divisors d of 3*n^2 gives all candidates for y = (d + 3*n^2/d)/4 and x = (n +- sqrt(4*y^2 - 3*n^2)) / 2 which must be positive. (End)

Examples

			For n = 8, there are 4 possible integer triangles with side length 8 and adjacent angle 60 degrees. Their side lengths are {8, 3, 7}, {8, 5, 7}, {8, 8, 8}, {8, 15, 13}.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(x=1, n^2, issquare(x^2 - n * x + n^2)); \\ David A. Corneth, Dec 09 2021
    
  • PARI
    a(n) = { my(n23 = 3*n^2, d = divisors(n23), res = 0); for(i = 1, (#d + 1)\2, y = (d[i] + n23/d[i])/4; if(denominator(y) == 1, x = (n + sqrtint(4*y^2 - n23))/2; if(denominator(x) == 1, res++ ); x = (n - sqrtint(4*y^2 - n23))/2; if(x > 0 && denominator(x) == 1, res++ ); ) ); res } \\ faster than above \\ David A. Corneth, Dec 10 2021

Extensions

More terms from David A. Corneth, Dec 09 2021

A340460 Numbers k for which tan(k) > sqrt(k).

Original entry on oeis.org

1, 14, 36, 58, 80, 168, 190, 212, 234, 256, 278, 300, 322, 344, 611, 633, 655, 677, 699, 988, 1010, 1032, 1054, 1365, 1387, 1409, 1720, 1742, 1764, 2075, 2097, 2119, 2452, 2474, 2807, 2829, 3162, 3184, 3517, 3539, 3872, 3894, 4227, 4249, 4582, 4604, 4937, 4959, 5292, 5314, 5647, 5669, 6002
Offset: 1

Author

Joseph C. Y. Wong, Jan 08 2021

Keywords

Examples

			tan(14) > sqrt(14) so 14 is a term.
		

Crossrefs

Cf. A024814.
Supersequence of A249836.

Programs

A337249 Numbers k for which csc(k) > k.

Original entry on oeis.org

1, 3, 44, 710, 1420, 2130, 2840, 312689, 10838702, 6167950454, 21053343141, 63160029423, 105266715705
Offset: 1

Author

Joseph C. Y. Wong, Aug 21 2020

Keywords

Comments

a(14) > 1.129*10^12, if it exists. - Kevin P. Thompson, Nov 07 2021
a(14) exists. The numbers 428224593349304, 6134899525417045, 66627445592888887, 430010946591069243, and 2646693125139304345 all satisfy csc(k) > k and are larger than a(13). It is not yet proven whether these are a(14) - a(18) or if there are any other numbers in the sequence before or between them. - Wolfe Padawer, Apr 11 2023

Examples

			csc(1) = 1.1884... so 1 is a term.
		

Crossrefs

Subsequence of A080142, A046955.
Subsequence of A265735 and A325158 if you omit the first term of A337249.

Programs

  • Mathematica
    Select[Range[10^6], Csc[#] > # &] (* Amiram Eldar, Aug 21 2020 *)
  • PARI
    isok(m) = 1/sin(m) > m; \\ Michel Marcus, Aug 27 2020
  • Python
    import math
    i = 1
    while True:
      if 1 / math.sin(i) > i:
        print(i)
      i += 1
    

Extensions

a(11)-a(13) from Kevin P. Thompson, Nov 07 2021

A337248 Numbers k for which sec(k) > k.

Original entry on oeis.org

1, 11, 52174, 260515, 37362253, 42781604, 2685575996367
Offset: 1

Author

Joseph C. Y. Wong, Aug 21 2020

Keywords

Comments

This sequence includes abs(m) for many terms m from A088306, including 1, 11, 52174, 260515, 37362253, 42781604, 2685575996367, 65398140378926, 214112296674652, 12055686754159438, 18190586279576483, 1538352035865186794, 1428599129020608582548671, 103177264599407569664999125, 9322105473781932574489648896, .... - Jon E. Schoenfield, Feb 12 2021
From Wolfe Padawer, Jan 05 2023: (Start)
For any given value in this sequence, it is extremely unlikely that it or its negation is not also in A088306. Take the following facts:
[1] |sec(x)| > |tan(x)| for any finite value of sec(x) and tan(x).
[2] |sec(x)| - |tan(x)| approaches 0, and |sec(x)| and |tan(x)| approach infinity, as x approaches (0.5 + n)*Pi where n is any integer.
[3] Any integer k where |sec(k)| > k or |tan(k)| > k must be close to some value of (0.5 + n)*Pi, increasingly so with larger k.
[4] sec(2685575996367) - |tan(2685575996367)| is approximately 8.437*10^-14.
Therefore, for any integer k > 2685575996367 where sec(k) > k, it must be that sec(k) - |tan(k)| < 8.437*10^-14. In order for sec(k) > k but |tan(k)| < k, it must be that k + 8.437*10^-14 > sec(k) > k, a very small interval that only gets smaller as k increases.
It is thus extremely likely, but not yet explicitly proven, that a(8) = 65398140378926, a(9) = 214112296674652, and a(10) = 12055686754159438. Assuming it exists, the smallest k for which sec(k) > k but |tan(k)| < k is probably very large, and it is unknown whether it is currently computable. (End)

Examples

			sec(1) = 1.8508... so 1 is a term.
		

Crossrefs

Subsequence of A337371.

Programs

  • Mathematica
    Select[Range[10^6], Sec[#] > # &] (* Amiram Eldar, Aug 21 2020 *)
  • PARI
    isok(m) = 1/cos(m) > m; \\ Michel Marcus, Aug 27 2020
  • Python
    import math
    i = 1
    while True:
      if 1 / math.cos(i) > i:
        print(i)
      i += 1
    

Extensions

a(7) from Wolfe Padawer, Jan 05 2023