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.

A169834 Numbers k such that d(k-1) = d(k) = d(k+1).

Original entry on oeis.org

34, 86, 94, 142, 202, 214, 218, 231, 243, 244, 302, 375, 394, 446, 604, 634, 664, 698, 903, 922, 1042, 1106, 1138, 1262, 1275, 1310, 1335, 1346, 1402, 1642, 1762, 1833, 1838, 1886, 1894, 1925, 1942, 1982, 2014, 2055, 2102, 2134, 2182, 2218, 2265, 2306, 2344, 2362
Offset: 1

Views

Author

N. J. A. Sloane, Jun 02 2010

Keywords

Crossrefs

Programs

  • Haskell
    a169834 n = a169834_list !! (n-1)
    a169834_list = f a051950_list [0..] where
       f (0:0:ws) (x:y:zs) = y : f (0:ws) (y:zs)
       f (:v:ws) (:y:zs) = f (v:ws) (y:zs)
    -- Reinhard Zumkeller, Aug 31 2014
    
  • Maple
    q:= n-> is(nops(map(numtheory[tau], {$n-1..n+1}))=1):
    select(q, [$1..3000])[];  # Alois P. Heinz, Jun 24 2021
  • Mathematica
    d[n_] := DivisorSigma[0, n];
    samedQ[n_] := d[n-1] == d[n] == d[n+1];
    Select[Range[3000], samedQ] (* Jean-François Alcover, Aug 01 2018 *)
    1 + Flatten@Position[Differences@#&/@Partition[DivisorSigma[0, Range@3000], 3, 1], {0, 0}] (* Hans Rudolf Widmer, Feb 02 2023 *)
  • Python
    from sympy import divisor_count as d
    def ok(n): return d(n-1) == d(n) == d(n+1)
    print(list(filter(ok, range(1, 2400)))) # Michael S. Branicky, Jun 24 2021

Formula

a(n) = A005238(n) + 1. - Jon Maiga / Georg Fischer, Jun 24 2021