prepaid expenses and other assets. These sources of cash were partially offset by a $6.7 million increase in inventories due to lower demand and a $2.0 million increase in accounts receivable due to timing of customer payments.
Operating activities generated $22.8 million of cash in the six months ended June 30, 2023. Net income for this period was $21.7 million; we also incurred depreciation, non-cash stock-based compensation expense, amortization of intangibles and amortization premiums on marketable securities of $17.7 million, $14.1 million, $1.1 million, and $0.4 million, respectively. Sources of cash primarily included an $8.8 million increase in accounts payable (excluding payables related to property and equipment) due to timing of payments. These sources of cash were partially offset by a $14.3 million increase in inventories, a $7.2 million increase in prepaid expenses and other assets primarily due to federal income tax prepayments, a $10.8 million increase in accounts receivable, a $5.4 million decrease in taxes payable and accrued liabilities primarily due to timing of customer rebate payments, and a $2.8 million increase in deferred income taxes.
Cash from Investing Activities
Our investing activities in the six months ended June 30, 2024 resulted in a $0.9 million net use of cash, primarily consisting of $8.5 million used for purchases of property and equipment (primarily production-related machinery and equipment), partially offset by $7.6 million from sales and maturities of marketable securities, net of purchases.
Our investing activities in the six months ended June 30, 2023 resulted in $19.4 million net use of cash, primarily consisting of $12.2 million used for purchases of marketable securities net of proceeds from sales and maturities, and $7.2 million used for purchases of property and equipment, primarily production-related machinery and equipment.
Cash from Financing Activities
Our financing activities in the six months ended June 30, 2024 resulted in a $46.0 million net use of cash, consisting of $26.0 million for the repurchase of our common stock and $22.7 million for the payment of dividends to stockholders, partially offset by proceeds of $2.7 million from the issuance of shares through our employee stock purchase plan.
Our financing activities in the six months ended June 30, 2023 resulted in a $24.7 million net use of cash, consisting of $21.8 million for the payment of dividends to stockholders and $6.0 million for the repurchase of our common stock, partially offset by $3.1 million from the issuance of shares through our employee stock purchase plan.
Dividends
In February 2023, our board of directors declared dividends of $0.19 per share to be paid to stockholders of record at the end of each quarter in 2023. In October 2023, our board of directors raised the quarterly cash dividend with the declaration of five cash dividends of $0.20 per share to be paid to stockholders of record at the end of the fourth quarter in 2023 (in lieu of the $0.19 per share announced in February 2023) and at the end of each quarter in 2024.
Dividend payouts of $11.4 million occurred on March 28, 2024 and June 28, 2024. The declaration of any future cash dividend is at the discretion of the board of directors and will depend on our financial condition, results of operations, capital requirements, business conditions and other factors, as well as a determination that cash dividends are in the best interests of our stockholders.
Stock Repurchases
As of December 31, 2023, we had $26.0 million remaining under our stock-repurchase program. In the six months ended June 30, 2024, we repurchased approximately 371,000 shares of our common stock for $26.0 million, leaving no amount authorized for stock repurchases as of June 30, 2024. Authorization of future repurchase programs is at the discretion of our board of directors and will depend on our financial condition, results of operations, capital requirements, business conditions and other factors.
Contractual Commitments
As of June 30, 2024 we had a contractual obligation related to income tax, which consisted primarily of unrecognized tax benefits of approximately $16.4 million and interest associated with those benefits of approximately $0.3 million. A portion of the tax obligation is classified as long-term income taxes payable and a portion is recorded in deferred tax assets in our condensed consolidated balance sheet.