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.

A385683 Complement of A030511.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Chai Wah Wu, Aug 04 2025

Keywords

Comments

Positive numbers not of the form floor(2*k^2/3).

Crossrefs

Cf. A030511.

Programs

  • Mathematica
    m[n_]:=Floor[Sqrt[3(n-1)/2]];a[n_]:=If[n+m[n]>Floor[2(m[n]+1)^2/3],n+m[n],n+m[n]-1];Array[a,67] (* James C. McMahon, Aug 06 2025 *)
  • Python
    from math import isqrt
    def A385683(n): return n+(m:=isqrt(3*(n-1)>>1))-(n+m<=((m+1)**2<<1)//3)

Formula

a(n) = n+m if n+m>floor(2*(m+1)^2/3) and a(n) = n+m-1 otherwise where m = floor(sqrt(3*(n-1)/2)).