#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1143
Task: \boxed{Write a Python function that calculates the number of distinct ways to partition a given integer into a sum of consecutive integers, where each consecutive sequence has at least two numbers and
Generated: 2026-02-12T21:48:44.176335
"""

def sieve_eratosthenes(n):
    sieve = [True] * (n + 1)
    sieve[0] = sieve[1] = False
    for i in range(2, int(n**0.5) + 1):
        if sieve[i]:
            for j in range(i * i, n + 1, i):
                sieve[j] = False
    primes = [i for i, is_prime in enumerate(sieve) if is_prime]
    return primes

def count_consecutive_partitions(N):
    primes = sieve_eratosthenes(N)
    count = 0
    for n in primes:
        if n < 2:
            continue
        sum_part = n * (n - 1) // 2
        if sum_part >= N:
            continue
        temp = N - sum_part
        if temp % n == 0:
            a = temp // n
            if a > 0:
                count += 1
    return count

if __name__ == '__main__':
    N = 15
    result = count_consecutive_partitions(N)
    print(f"Number of ways to partition {N} with prime-length consecutive sequences: {result}")